Skip to content

Instantly share code, notes, and snippets.

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 danbeam/1074226 to your computer and use it in GitHub Desktop.
Save danbeam/1074226 to your computer and use it in GitHub Desktop.
The shell file that calculates the answer to life the universe and everything
#!/bin/sh
answer() { echo -e "\n\nAnswer: 42\n"; exit; }
trap answer TRAP INT HUP;
while [ 1 ]; do head -10 /dev/urandom | hexdump -C | head -3 | egrep --color=auto '[a-f][0-9a-f]'; sleep .1; done
# to run -
# curl https://raw.github.com/gist/1074226/the_answer_to_life_the_universe_and_everything.sh | sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment