Skip to content

Instantly share code, notes, and snippets.

@justecorruptio
Last active July 19, 2019 06:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save justecorruptio/c7d428b9304a5cef2949 to your computer and use it in GitHub Desktop.
Save justecorruptio/c7d428b9304a5cef2949 to your computer and use it in GitHub Desktop.
Bash www server. Golfed from github.com/jaburns/ngincat
#!/bin/bash
:|((read f g h
[[ -f .$g&&$g != *..* ]]&&echo "$h 200 O
"&&cat .$g)|nc -q0 -lp$1)>/dev/fd/0;$0 $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment