Path: utzoo!attcan!uunet!olivea!apple!altos!megadon!clp From: hartman@ide.com (Robert Hartman) Newsgroups: comp.unix Subject: Re: Nasty little shell syntax problem for a Wizard Message-ID: <2272@megadon.UUCP> Date: 21 Nov 90 00:04:45 GMT References: <2258@megadon.UUCP> Sender: clp@megadon.UUCP Organization: IDE, San Francisco Lines: 30 Approved: clp@megadon.UUCP In article <2258@megadon.UUCP> uunet!odetics!frank (Frank Merrow) writes: >... >I am running a command out of "make" so the condition code is important in what >I am doing . . . > >Step 1 > >gcc || (abort_script;exit 1) > >This statement lets me do some post processing when the compiler finds an error. > >Step 2 > >gcc is generating a SINGLE warning message that I want to suppress, BUT I want >the warning in all cases except for one VERY special one. ... [deleted discussion of options for getting around fact that return code from a pipeline is that of the last command in the pipeline] This seems like the wrong tack to me. I'd suggest putting the code to filter out the undesired instances of the error message in the post-processing script, invoking it as follows: gcc ... 2>&1 gcc.out || (abort_script < gcc.out; exit 1) Between make and the shell there are all sorts of clever things a person can do. However, it is often best not to (as anyone who's had to modify some of _my_ early makefiles will agree). -r