Skip to content
Advertisement

Tag: logical-operators

How logical operators works

I tried below but it doesn’t work. Throwing some errors. Exp1 or expr2 should evaluate first & at result should be evaluated with expr3 ( &&) i tried as per suggestion, it throws error as Fyi- that date is val1 value. Answer You might see different results based on the shell or version, eg: sh vs bash vs ash. One

bash command XOR ^ anothercommand

In the example below: what’s the expected behaviour of the XOR operator in shell? So when we enter what triggers anothercommand to run (if it will execute at all)? Answer If you enter command ^ anothercommand, you are simply providing command with two arguments, ^ and anothercommand. There is no operator here. anothercommand will only run if command decides to

Advertisement