Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. allowed_versions={v1.0,v1.1,v1.5,v2.3}
  2. read -r -p 'Enter a version: ' version_inputted
  3. if [[ "${version_inputted}" == "${allowed_versions}" ]]
  4. then
  5. echo 'That version is allowed.'
  6. else
  7. echo 'That version is NOT allowed.'
  8. fi
  9.  
  10. Enter a version: v1.0
  11. That version is allowed.
  12.  
  13. Enter a version: v9.6
  14. That version is NOT allowed.
  15.  
  16. Enter a version: v1.5
  17. That version is allowed.
  18.  
  19. Enter a version: asdflj';~!@ #$%^&*)_+=-<>,.?/~`|}{][:"(
  20. That version is NOT allowed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement