Skip to content

Instantly share code, notes, and snippets.

@garybernhardt
Created April 30, 2014 22:57
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garybernhardt/d97d3ab48033a34fed23 to your computer and use it in GitHub Desktop.
Save garybernhardt/d97d3ab48033a34fed23 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
main() {
if [ ! -p .test-commands ]; then
mkfifo .test-commands
fi
while true; do
cmd=$(cat .test-commands)
if [[ $cmd == "" ]]; then
continue
else
clear
echo "\$ $cmd"
sh -c "$cmd"
fi
done
}
main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment