Skip to content

Instantly share code, notes, and snippets.

@JKirchartz
Created December 26, 2018 18:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JKirchartz/9abdf0ffe6687971cd28d03c021078e2 to your computer and use it in GitHub Desktop.
Save JKirchartz/9abdf0ffe6687971cd28d03c021078e2 to your computer and use it in GitHub Desktop.
make your own fake shell in bash
#!/bin/bash
function parser {
shopt -s nocasematch
case "$*" in
exit) exit 0;;
echo*) shift; echo $*;;
*) figlet $* | lolcat;;
esac
}
# fake a shell
while read -p "$>" i; do parser $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment