Skip to content

Instantly share code, notes, and snippets.

@rchrd2
Forked from cwarden/stdin2www.sh
Last active January 7, 2017 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rchrd2/dc0ecbaeffaf75d253c3711985602d09 to your computer and use it in GitHub Desktop.
Save rchrd2/dc0ecbaeffaf75d253c3711985602d09 to your computer and use it in GitHub Desktop.
Show stdin in a web browser (for Mac OS X)
#!/bin/sh
# read from stdin, write to a temp file, open the temp file in a browser, then delete it
tmpfile=$(mktemp).html; cat > $tmpfile; open $tmpfile; #rm $tmpfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment