BTW, as a quick comment on your script, you should be able to at least reduce the two sed
commands to one with multiple "-e
Or even better, replace them with shell built-in parameter expansion
or other string manipulations
$(..) is highly recommended over `..`
Finally, the variable setting and touch
commands are not part of the printed output, so for clarity set them apart from the rest.
echo "Content-type: text/html"
echo "<html><head><title>What You Said</title></head>"
echo "<body>Here's what you said: <br>"
echo "You entered $USERNAME"
If the output were longer, I might go for a here document
instead of a bunch of echo
s, but since that requires the external cat
command, it's not really worth it here.