I can imagine that someone would find a program like this to be useful, and depends on the presently common behavior of zcat, so I expect this is an important part of a system used by a corporation I interact with (and probably many more than I’d expect):
if
zcat ./file.txt.gz >/dev/null
then
process_file ./file.txt.gz
elseprintf'%s\n'"There was a decimal exit status of ${?}"fi
I already expressed that quickly getting an exit status that isn’t 0 after an issue is encountered is probably useful.
I can imagine that someone would find a program like this to be useful, and depends on the presently common behavior of
zcat
, so I expect this is an important part of a system used by a corporation I interact with (and probably many more than I’d expect):if zcat ./file.txt.gz >/dev/null then process_file ./file.txt.gz else printf '%s\n' "There was a decimal exit status of ${?}" fi
A failure to understand whether something is useful is not a good reason to change it.