Skip to content

Instantly share code, notes, and snippets.

@dai0304
Created May 20, 2011 02:30
Show Gist options
  • Save dai0304/982239 to your computer and use it in GitHub Desktop.
Save dai0304/982239 to your computer and use it in GitHub Desktop.
#!/bin/bash
STR=ABC-0
if [[ "$STR" =~ "-0$" ]]; then
echo A
else
echo B
fi
@dai0304
Copy link
Author

dai0304 commented May 20, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment