public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
From: Mel Hatzis <hatzis@juniper.net>
To: Milan Zamazal <pdm@zamazal.org>
Cc: doug.mildram@mindspeed.com, help-gnats@gnu.org
Subject: Re: solaris "nawk" fixes edit-pr awk: syntax error
Date: Mon, 20 May 2002 11:42:00 -0000	[thread overview]
Message-ID: <3CE942F8.3040704@juniper.net> (raw)
In-Reply-To: <87offbgpr8.fsf@swan.zamazal.org>

Milan Zamazal wrote:
>>>>>>"dm" == doug mildram <doug.mildram@mindspeed.com> 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

  reply	other threads:[~2002-05-20 18:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-14 10:54 doug.mildram
2002-05-20  5:28 ` Milan Zamazal
2002-05-20 11:42   ` Mel Hatzis [this message]
2002-05-26  8:37     ` Milan Zamazal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3CE942F8.3040704@juniper.net \
    --to=hatzis@juniper.net \
    --cc=doug.mildram@mindspeed.com \
    --cc=help-gnats@gnu.org \
    --cc=pdm@zamazal.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).