#!/bin/bash
set -x
# Start the HTML file
echo '
File Index
File Index
' > index.html
# Add files and directories to the HTML
for item in *; do
if [ -d "$item" ]; then
echo " - $item/
" >> index.html
else
echo " - $item
" >> index.html
fi
done
# End the HTML file
echo '
' >> index.html