From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4501 invoked from network); 20 May 2002 18:42:25 -0000 Received: from unknown (HELO fencepost.gnu.org) (199.232.76.164) by sources.redhat.com with SMTP; 20 May 2002 18:42:25 -0000 Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179s6g-0007ev-00; Mon, 20 May 2002 14:42:06 -0400 Received: from natint.juniper.net ([207.17.136.129] helo=merlot.juniper.net) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 179s53-0007D7-00 for ; Mon, 20 May 2002 14:40:25 -0400 Received: from juniper.net (hatzis-bsd.juniper.net [172.17.12.59]) by merlot.juniper.net (8.11.3/8.11.3) with ESMTP id g4KIdrm26297; Mon, 20 May 2002 11:39:53 -0700 (PDT) (envelope-from hatzis@juniper.net) Message-ID: <3CE942F8.3040704@juniper.net> From: Mel Hatzis User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.8) Gecko/20020206 X-Accept-Language: en-us MIME-Version: 1.0 To: Milan Zamazal CC: doug.mildram@mindspeed.com, help-gnats@gnu.org Subject: Re: solaris "nawk" fixes edit-pr awk: syntax error References: <200203141851.g2EIpSt09542@dogbert.westboro.mindspeed.com> <87offbgpr8.fsf@swan.zamazal.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: help-gnats-admin@gnu.org Errors-To: help-gnats-admin@gnu.org X-BeenThere: help-gnats@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: General discussion about GNU GNATS List-Archive: Date: Mon, 20 May 2002 11:42:00 -0000 X-SW-Source: 2002-q2/txt/msg00058.txt.bz2 Milan Zamazal wrote: >>>>>>"dm" == doug mildram writes: >>>>>> > > dm> MINOR suggestion: no harm in littering /tmp with epNNNN files. > dm> around line 120 in edit-pr I'm changing > dm> #trap 'rm -f $new $new.old $change_msg $fixfil ; exit 0' 0 > dm> changing to > dm> trap 'rm -f $new.old $change_msg $fixfil ; exit 0' 0 > > Thanks for the suggestion. It's a good idea, but I removed $new only > from the second trap (error signals). > > Frankly, I don't know what `trap ... 0' is (no /bin/sh manual here > around). If any /bin/sh guru knows, please enlighten me. The 'trap' command as used above basically let's the shell perform an action (in this case the 'rm') when it exits - using '0' as the second argument means the trap is executed for both normal exits as well as interrupts. The use of single quotes means variable and command substitution of the command is done when the trap is executed rather than when the trap is set. An excellent resource for additional information is O'Reilly's 'Unix Power Tools' by Peek, O'Reilly and Loukides. > > dm> MAJOR FIX: for solaris diff-prs ....change awk to nawk. > > Well, there sometimes occur Solaris compatibility bugs. They are > usually unpleasant bugs, since they occur only on certain Solaris > versions. I am sorry, but I rather spend my spare time fixing bugs > present on free systems (such as GNU/Linux, GNU/HURD or free versions of > BSD), I hope you understand it. If someone submits reasonable > compatibility patches, I'll incorporate it, of course. > Perhaps you could conditionally set an 'awk' variable based on the output of 'uname -sr' in this case. -- Mel Hatzis Juniper Networks, Inc. _______________________________________________ Help-gnats mailing list Help-gnats@gnu.org http://mail.gnu.org/mailman/listinfo/help-gnats