> What is the correct way of detecting failure exit status of
> FOO_COMMAND (a networked operation) and ignoring exit status of
> BAR_COMMAND?
Perhaps something like this would work?
target:
fn ignore { $* || status=() }
foo | ignore bar
Tony
On Wed Nov 20 10:57:46 EST 2013, arn...@skeeve.com wrote:
> > ! ~ $st ?* ^ '|' ^ *
>
> Sheesh. I'm a long time Unix type and even to *me* that looks like
> line noise. :-)
! ~ $status ?* ^ '|' ^ *
ah, sorry. FTFY.
- erik
> ! ~ $st ?* ^ '|' ^ *
Sheesh. I'm a long time Unix type and even to *me* that looks like
line noise. :-)
Arnold
> target: prereq
> FOO_COMMAND | BAR_COMMAND
> st = $status
> if (~ $st ?* ^ '|' ^ *) {
> echo FOO_COMMAND failed
> exit 3 }
i think there a bug in this. a trailing ~ 1 1
or similar is necessary to clear the status from the if.
alternately, how about replacing the if
Hi list,
apologies for the keyword overload ;-)
I have a plan9port mkfile using Rc (MKSHELL=$PLAN9/bin/rc), a recipe
contains pipeline: FOO_COMMAND | BAR_COMMAND.
What is the correct way of detecting failure exit status of
FOO_COMMAND (a networked operation) and ignoring exit status of
BAR_COMMA