I want to invert the exit code of a piped command sequence: foo | bar within the ZSH. So 0 maps to 1 and 1-128 maps to 0.
foo | bar
POSIX shells, including bash, zsh and dash, support the ! modifier:
! foo | bar
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
4 years ago