Created
December 26, 2018 18:49
-
-
Save JKirchartz/9abdf0ffe6687971cd28d03c021078e2 to your computer and use it in GitHub Desktop.
make your own fake shell in bash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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