Advertisement
Guest User

Untitled

a guest
Sep 4th, 2015
70
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. names=(jack john)
  4. IS_SEEN=""
  5.  
  6. for i in "$names"; do
  7. if [ "$1" = "$i" ]; then
  8. IS_SEEN="yes"
  9. fi
  10. done
  11.  
  12. if [ "$IS_SEEN" = "" ]; then
  13. echo "Choose from list!"
  14. exit 0
  15. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement