Myvideo

Guest

Login

Shell Scripting Tutorial for Beginners 9 - Logical 'OR' Operator

Uploaded By: Myvideo
1 view
0
0 votes
0

The Logical OR “||“ is a boolean operator that executes following commands based on the outcome of previously executed commands. Logical OR (||) if [[expr1 ||expr2]] Returns expr1 if it can be converted to false; otherwise, returns expr2. Thus, when used with Boolean values, && returns true if one operands are true; otherwise, returns false. - for using And operator use || if [ “$age“ -gt 18] || [“$age“ -lt 30 ] - The -o option provide an alternative compound condition test. if [ “$age“ -gt 18 -o “$age“ -lt 30 ] - if [[ $condition1 || $condition2 ]] # Also works. if [[ “$age“ -gt 18 || “$age“ -lt 30 ]] ★★★Top Online Courses From ProgrammingKnowledge ★★★ Python Programming Course ➡️ ⚫️ Java Programming Course ➡️ ⚫️ ht ... #ProgrammingKnowledge #Bourne_Shell_and_Programming #Bash_scripting #Unix #Tutorials #Learning #Operating #System #OS #Beginners 20170315 RtbeGJfssGQ

Share with your friends

Link:

Embed:

Video Size:

Custom size:

x

Add to Playlist:

Favorites
My Playlist
Watch Later