One of the things to keep in mind is that while a single pipe (|) is a logical OR that evaluates all arguments, the double pipe (the one you refer to) will exit processing as soon as it receives a true value.
To expand upon what marsd said, if the first command terminates with an exit code other than 0, it is considered to have failed. In this case, the second command is executed.
If the first command terminates with a 0, it is perceived to be a success and the second command is ignored.
On a similar note is the and (&&) feature. With and, the second command is executed only if the first command terminates successfully (i.e., exit code 0).
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.