Shell Script – Multiple Conditions In single if statement

This is how you can use multiple conditions in single if statement,
“`
#!/bin/bash


if [[ ( “$user” != “condition1” ) && ( “$user” != “condition2” ) && ( “$user” != “condition3” ) ]] ; then


echo “woohoo, its working”


fi


done“`

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Scroll to Top