Skip to content

Instantly share code, notes, and snippets.

@loneicewolf
Created January 10, 2022 12:46
Show Gist options
  • Save loneicewolf/cb5818111049870f0f5bcf664ca58d0d to your computer and use it in GitHub Desktop.
Save loneicewolf/cb5818111049870f0f5bcf664ca58d0d to your computer and use it in GitHub Desktop.
more_cases.sh
for i in {1..3}
do
echo $i
export m1="msg 1"
export m2="msg 2"
export m3="msg 3"
case $i in
1) echo "$m1";;
2) echo "$m2";;
3) echo "$m3";;
*) echo "*";;
esac
done
### bash d.sh
### 1
### msg 1
### 2
### msg 2
### 3
### msg 3
###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment