Bash if statement with multiple conditions throws an error
Use -a (for and) and -o (for or) operations. tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html Update Actually you could still use && and || with the -eq operation. So your script would be like this: Although in your case you can discard the last two expressions and just stick with one or operation like this: