Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # usage: split.sh foo,bar
- options=($(echo $1 | tr "," "\n"))
- for i in "${options[@]}"
- do
- case $i in
- "foo")
- echo Foo
- ;;
- "bar")
- echo Bar
- ;;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement