Advertisement
Guest User

Untitled

a guest
Dec 22nd, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. list=(M T W T F S S)
  4. read -p "input data : " choice
  5. if [[ $choice =~ ^[0-9]+$ ]]; then
  6. echo "choice{list[x%7]}"
  7. else
  8. echo "Could not understand input! Script only recognises ...."
  9. echo "Try to enter again"
  10. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement