What is && in shell script?

Minh Tung

New member
What is && in shell script?
Answer
Logical AND operator(&&):
The second command will only execute if the first command has executed successfully i.e, its exit status is zero. This operator can be used to check if the first command has been successfully executed. This is one of the most used commands in the command line. Syntax: command1 && command2.
 

Tìm kiếm

Back
Top