Advertisement
Guest User

Untitled

a guest
Oct 16th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # usage: split.sh foo,bar
  4.  
  5. options=($(echo $1 | tr "," "\n"))
  6.  
  7. for i in "${options[@]}"
  8. do
  9. case $i in
  10. "foo")
  11. echo Foo
  12. ;;
  13. "bar")
  14. echo Bar
  15. ;;
  16. esac
  17. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement