[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fwd: gawk bug]
From: |
Eiso AB |
Subject: |
[Fwd: gawk bug] |
Date: |
Tue, 23 Nov 2004 10:13:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 |
hi again(?),
not sure if this got through yesterday, and I didn't include output.
the script produces
H99 N|
instead of the expected
H99 N
so in the second gsub not all |'s
are removed.
goodluck, Eiso
-------- Original Message --------
Subject: gawk bug
Date: Mon, 22 Nov 2004 18:20:42 +0100
From: Eiso AB <address@hidden>
To: address@hidden
CC: address@hidden
References: <address@hidden> <address@hidden>
<address@hidden>
hi Arnold,
this produces a bug in gawk 3.1.4
put this in an awk script (bug.awk)
{
( FILENAME ~ /[.]save$/ )
h=$2
gsub("[|]"," ",h)
x=$1
gsub("[|]"," ",x)
print x
}
then run as
echo "|H99|N| |H99|HN|" > t.save ; gawk -f bug.awk t.save
removal of:
* ( FILENAME ~ /[.]save$/ )
* gsub("[|]"," ",h)
and change of the filename(!)
will make the error disappear.
very strange!
goodluck,
Eiso
--
_________
_________________/ Eiso AB \___________________________
o
o Dept. of NMR Spectroscopy
Bijvoet Center for Biomol. Research
Utrecht University
o Padualaan 8, 3584 CH Utrecht
. . The Netherlands
o ^
| - _ address@hidden
\__|__/
| http://www.nmr.chem.uu.nl/~eiso
| tel: +31-30-2539929
/ \
/ \
| |
___ ._| |_. _________________________________________
--
_________
_________________/ Eiso AB \___________________________
o
o Dept. of NMR Spectroscopy
Bijvoet Center for Biomol. Research
Utrecht University
o Padualaan 8, 3584 CH Utrecht
. . The Netherlands
o ^
| - _ address@hidden
\__|__/
| http://www.nmr.chem.uu.nl/~eiso
| tel: +31-30-2539929
/ \
/ \
| |
___ ._| |_. _________________________________________
- [Fwd: gawk bug],
Eiso AB <=