compiler
compiler copied to clipboard
make it as simple as possible
the fact that this is bash is confusing, this script doesn't use any bashisms, so i switched it to (POSIX) sh
the trap had really no purpose that i saw.
the while true loop can be substituted for while :; do done.
at this point this entire thing can just turn into an alias now.
but what was the while loop for? it can allow the script to exit on if nc had failed.
this script is also not a very good webserver as it doesn't check if index.html has changed, since index.html is piped through nc.
this 'project' can now be changed to httpsh or shhttp