I looked at Exiting a pipeline if a former command fails but I'm looking for a more general solution to this problem:
chlist -q -v -m -r $sourcelist | \
grep '^USER:' | \
chlist -q -v -f - $superlist
the problem is if the first chlist fails than no input into the 2nd chlist is very bad indeed.
Is there any solution to stopping the 2nd chlist from running other than putting the output of the first one into a temp file and then checking the exit status (eg not using a pipeline at all)?