help-gnats
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

solaris "nawk" fixes edit-pr awk: syntax error


From: doug . mildram
Subject: solaris "nawk" fixes edit-pr awk: syntax error
Date: Thu, 14 Mar 2002 13:51:27 -0500 (EST)

Running edit-pr under solaris in some instances, 
e.g.  changing State: or another reason-required field,
      causes edit-pr to attempt to prompt you for a reason,
         but under solaris, instead it barfs out:

awk: syntax error near line 24
awk: illegal statement near line 24

I recalled that there was a "nawk", newer than "awk", and Solaris
   keeps them both in /bin, foolishly? choosing not to make "nawk"
   the default "awk".    I found that edit-pr was really calling 

$LIBEXECDIR/gnats/diff-prs
         ....which is a "sh" script that really just does "awk",

and lucky me, nawk   seems to silence the lambs,
  and may even stop edit-pr from getting into a sick loop where it
   offers you to "(a)bort or (r)etry? " , 
      but (due to awk error) (r)etry silently bombs out, 
      so edit-pr keeps saying "(a)bort or (r)etry? "
              until you (a)bort....
      at which point it claims that 
"Changed pr is in /tmp/epNNNN"  (NNNN==PID),
      but...............the "trap" in edit-pr has REMOVED $new.


MINOR suggestion: no harm in littering /tmp with epNNNN files.
     around line 120 in edit-pr I'm changing
#trap 'rm -f $new $new.old $change_msg $fixfil ; exit 0' 0
                                    changing to
trap 'rm -f       $new.old $change_msg $fixfil ; exit 0' 0


MAJOR FIX: for solaris  diff-prs   ....change awk to nawk.

25c25
< awk '
---
> nawk '




reply via email to

[Prev in Thread] Current Thread [Next in Thread]