Shell - && - AND Boolean operator

> Procedural Languages > Bash Shell and (Unix|Linux) Utilities (XCU)

Table of Contents

1 - About

AND lists are sequences of one or more pipelines separated by the boolean operator &&.

An AND list has the form

command1 && command2

command2 is executed if, and only if, command1 returns an exit status of zero (true). It means that AND lists are executed with left associativity.

The return status of and and or lists is the exit status of the last command executed in the list.

Advertising