-
-
Save ptdorf/9b9ee358e2746319f7f1bb46c41e9f7d to your computer and use it in GitHub Desktop.
Bash www server. Golfed from github.com/jaburns/ngincat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
:|((read f g h | |
[[ -f .$g&&$g != *..* ]]&&echo "$h 200 OK | |
"&&cat .$g)|nc -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