Can someone explain why I get exit code 141 from the below?
#!/usr/bin/bash set -o pipefail zfs list | grep tank echo a ${PIPESTATUS[@]} zfs list | grep
I'm not familiar with zfs list, but I guess it complains about its standard output being closed - grep -q exits immediately when a match is found, unlike grep.
zfs list
grep -q
grep