Created
May 20, 2011 02:30
-
-
Save dai0304/982239 to your computer and use it in GitHub Desktop.
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 | |
STR=ABC-0 | |
if [[ "$STR" =~ "-0$" ]]; then | |
echo A | |
else | |
echo B | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://d.hatena.ne.jp/adsaria/20100107/1262842850
にて解決。