Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- allowed_versions={v1.0,v1.1,v1.5,v2.3}
- read -r -p 'Enter a version: ' version_inputted
- if [[ "${version_inputted}" == "${allowed_versions}" ]]
- then
- echo 'That version is allowed.'
- else
- echo 'That version is NOT allowed.'
- fi
- Enter a version: v1.0
- That version is allowed.
- Enter a version: v9.6
- That version is NOT allowed.
- Enter a version: v1.5
- That version is allowed.
- Enter a version: asdflj';~!@ #$%^&*)_+=-<>,.?/~`|}{][:"(
- That version is NOT allowed.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement