All the off-topic go here
-
As title.
-
D donho pinned this topic on
-
Hello, @jim-dailey and All,
Jim, you said :
Anyone who writes code would be well-served by at least a cursory familiarity with some version of AWK.
I completely agree with this statement :-))
BTW, The parentheses to surround the part
FNR,$0
are not mandatory, at least with gawkv4.0.2
. So :awk "{print FNR,$0}" snip.txt > nsnip.txt
This version does NOT need any associated DLL and is ridiculously small :
156,174
bytes, although really very powerful !Best Regards,
guy038
P.S. :
I used with an INPUT file of size
73,519 Ko
, containing444,810
lines with an average number of chars of150
per line.And guess what : the OUTPUT file was created in
4,1 s
, on my very old Win XP machine ! -
A Alan Kilborn referenced this topic on
-
Hello to you, @guy038. You said
BTW, The parentheses to surround the part
FNR,$0
are not mandatory, at least with gawkv4.0.2
.You are correct, but I can’t bring myself not to use parenthesis with print() and printf(). But that’s just the start of my “non-standard” AWK behaviors. As an example, any substantial script I write will start thusly:
BEGIN {exit}
How’s that for non-standard?! :-)