Created
September 29, 2018 09:10
-
-
Save bartlett705/e92aa689fdb8d483bb68ec241d1f71da to your computer and use it in GitHub Desktop.
diff 2 strings on the command line
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 | |
# shamelessley ripped from stack overflow | |
# compares two string args with 'success' message if they match exactly | |
string1=$1 | |
string2=$2 | |
[ "$string1" == "$string2" ] || { echo "⛔ dong due et ⛔" && false; } && echo "👍 good stuff 👍" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment