I just found this via Heise online: Web server in one line of bash I tried it and it works! while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; cat index.html; } | nc -l 8080; done You can replace index.html with any file you happen to want to transfer (also works for binary files). … Continue reading A web server as a shell script – in a single line