Created
July 8, 2017 08:37
-
-
Save rm1984/7f99aef3ba53402495d8475fc948acc2 to your computer and use it in GitHub Desktop.
Checks if a dumb user writes a command in uppercase
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
export PROMPT_COMMAND='echo "$(history 1 | cut -c 8-)" >> /tmp/.cmds ; FULLCMD=$(tail -1 /tmp/.cmds) ; FIRSTCMD=$(echo "$FULLCMD" | cut -d" " -f1) ; if [ -z $(echo $FIRSTCMD | tr -d "[:upper:]") ]; echo "*** WHY DAFUQ ARE YOU SHOUTING?!? ***" ; fi' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment