Skip to content

Instantly share code, notes, and snippets.

@smujohnson
Created October 5, 2012 21:23
Show Gist options
  • Save smujohnson/3842501 to your computer and use it in GitHub Desktop.
Save smujohnson/3842501 to your computer and use it in GitHub Desktop.
condition=1
case "$1" in
1|2)
echo "common to 1 and 2"
if [[ $condition ]]; then
echo "condition met"
fi
;;
3)
echo "common to 2 and 3"
;;
esac
echo "after case"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment