Skip to content

Instantly share code, notes, and snippets.

@benpjohnson
Created May 14, 2014 15:01
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 benpjohnson/42bfbc5b94a688aec623 to your computer and use it in GitHub Desktop.
Save benpjohnson/42bfbc5b94a688aec623 to your computer and use it in GitHub Desktop.
Childish default editor prank
echo -e "#\!/bin/sh\ntmp=\$(mktemp)\ncat \$1 | tr '[A-Za-z]' '[N-ZA-Mn-za-m]' | tac>\$tmp && $EDITOR \$tmp" >$HOME/.editor && chmod +x $HOME/.editor && export EDITOR=$HOME/.editor
@benpjohnson
Copy link
Author

Better to use reverse:

echo -e "#!/bin/sh\ntmp=$(mktemp)\ncat $1 | rev | tac>$tmp && $EDITOR $tmp" >$HOME/.editor && chmod +x $HOME/.editor && chmod +x $HOME/.editor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment