From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Wed, 20 Nov 2013 12:13:51 +0100 Message-ID: From: dexen deVries To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: [9fans] p9p mk rc help Topicbox-Message-UUID: 8ac26b48-ead8-11e9-9d60-3106f5b1d025 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_COMMAND? the best i came up with is very ugly: target: prereq FOO_COMMAND | BAR_COMMAND st = $status if (~ $st ?* ^ '|' ^ *) { echo FOO_COMMAND failed exit 3 } seems the | in pattern has to be quoted, otherwise is interpreted as pipe operator. regards, -- dx