#!/bin/bash input_dir=/usr/local/doc output_file=/usr/local/doc/HEADER.html cat > $output_file << EOF <html> <head> <title>$input_dir</title> </head> <body> EOF find $input_dir -iname 'index.html' | \ sed 's/[^ ]*/\<br\>\<a href="file:&"\>&\<\/a\>/' | \ sort >> $output_file cat >> $output_file << EOF </body> </html> EOF