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 operand is 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 ]]
In questa pagina del sito puoi guardare il video online 09. Shell Scripting Tutorial for Beginners - Logical 'OR' Operator della durata di ore minuti seconda in buona qualità , che l'utente ha caricato MyShadowbook Programmer 05 settembre 2017, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 16 volte e gli è piaciuto 0 spettatori. Buona visione!