#!/bin/sh for i in packages commands cfunctions fileformats do sort -f /dev/null `find /doc/merge -name $i.html` > /doc/$i.new mv /doc/$i.new /doc/$i.html done