O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

6.4. Conclusion

Using the && and || operators is very helpful when creating decision-making statements. It can also save your skin if you do not want the second command executed because the first failed. These methods give you control over what actions are to be taken based on the exit status of the commands on the left-hand side of the && or ||.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required