|
From: | Wolfgang Laun |
Subject: | Re: [bug-gawk] File partial overwrite when using join |
Date: | Fri, 5 Feb 2016 17:51:13 +0100 |
This is part of an Gawk program I wrote to find new ebuilds (Gentoo
equivalent of rpm spec) on an as wanted basis vs using esync and having
to check for them immediately.
I left all debug and return checking code in so you can see what happens.
I'm not certain if this odd behaviour is due to Gawk or join or something
else.
What happens is this:
You run the awk program and instead of printing out:
1 NEW PACKAGES
app/zaz [ masked ]
2 REMOVED PACKAGES
app/bar
You get:
1 NEW PACKAGES
2 REMOVED PACKAGES
app/bar
Technically you get more output then that, but that'd because this little
snippet is trying to be informative. If you uncomment the marked line the
case gets even weirder as Gawk overwrites instead of appending to the
file. I tried using sync and fflush to no avail.
I've attacked all three files so you can try it yourself. You'll
need to change the dir variable to reflect your own environment.
I also tried nawk but it did the same thing.
I'm using Gawk 4.0.2 .
Coreutils 8.23 .
bash 4.3.42 (my package manager calls it 4.3_p42-r1).
For the bandwidth limited the attachments plus this email are about
1.5KiB, the program snippet is only 50 lines.
Thanks, David
[Prev in Thread] | Current Thread | [Next in Thread] |