What Does || Do in Linux?
Contents the || Represents a Logical Or. the Second Command Is Executed Only When the First Command Fails (Returns a Non-Zero Exit Status). Here Is Another...
The || represents a logical OR. The second command is executed only when the first command fails (returns a non-zero exit status). Here is another example of the same logical OR principle. You can use this logical AND and logical OR to write an if-then-else structure on the command line.
What does || mean in Linux?
|| means execute the statement which follows only if the preceding statement failed (returned a non-zero exit code).
Must Read
What is || in shell script?
The OR Operator (||) is much like an ‘else’ statement in programming. The above operator allow you to execute second command only if the execution of first command fails, i.e., the exit status of first command is ‘1’.