Skip to main content
deleted 67 characters in body
Source Link
techraf
  • 6.1k
  • 11
  • 36
  • 51

The examples in the answer by Shawn J. Goff are correct, but the explanation is the other way around. Please check:

"The right side of && will only be evaluated if the exit status of the left side is NONZERO. || is the opposite: it will evaluate the right side only if the left side exit status is ZERO. "

PS: I edited three times that answer and someone removed that.

The right side of && will only be evaluated if the exit status of the left side is NONZERO. || is the opposite: it will evaluate the right side only if the left side exit status is ZERO.

The examples in the answer by Shawn J. Goff are correct, but the explanation is the other way around. Please check:

"The right side of && will only be evaluated if the exit status of the left side is NONZERO. || is the opposite: it will evaluate the right side only if the left side exit status is ZERO. "

PS: I edited three times that answer and someone removed that.

The examples in the answer by Shawn J. Goff are correct, but the explanation is the other way around. Please check:

The right side of && will only be evaluated if the exit status of the left side is NONZERO. || is the opposite: it will evaluate the right side only if the left side exit status is ZERO.

Source Link

The examples in the answer by Shawn J. Goff are correct, but the explanation is the other way around. Please check:

"The right side of && will only be evaluated if the exit status of the left side is NONZERO. || is the opposite: it will evaluate the right side only if the left side exit status is ZERO. "

PS: I edited three times that answer and someone removed that.