How should command substitution (`...`) work?

Doug Gwyn <gwyn> gwyn at brl-tgr.ARPA
Sat Dec 1 17:03:56 AEST 1984


> 		p `egrep -l pattern *`
>      It seems more natural to me that the shell should (silently) not
> run a pipeline if any command substitutions in it fail.

In case the filename matching is a side issue and you are mostly
concerned about the shell continuing when the `` command returns a
non-zero exit status, I definitely HAVE seen instances where the
current behavior is desired.  Non-zero exit status is not always
a catastrophic failure, as in the case of grep.

BRL UNIXes have a ^T "mini-systat" feature that lets one easily
determine whether he needs to type something (process shown as
blocked awaiting terminal input).  This is an ugly but useful hack
that makes accidents like the above much easier to cope with.



More information about the Comp.unix.wizards mailing list