I do understand that is a valid AWK program, but I tried to highlight the fact that the actual meaning of
A = "a"
according to AWK's interpretation, is
(A = "a") != 0 { print $0 }
and it is so unlogical that it is almost meaningless.
I mean, is there any sense to write such a condition that...
Recently I wrote the following fragment in AWK by accident:
A = "a"
B = "b"
{
}
END {
print A, B
}
And the result completely blowed my mind up.
Just try to run this code against e.g. the following input file:
1
2
3
and enjoy the result.
The AWK code above was actually a part of a bigger...
PHV, you wrote:
> I personally don't see any bug here.
Well, if such action as split(a[3], a, ",") is incorrect, then there must be some warning from AWK, for example: "WARNING: you can not split an array element into the same array".
But awk95 silently returns correct number of subfields and...
Hello, everybody.
Does anybody use awk95 by Brian W. Kernighan? I think, I found a bug in realization of function split(), but I am not sure.
Here is a sample code where you can see it:
BEGIN {
time = "10:30:00,000"
split( time, a, ":" )
print a[3] # prints 00,000 - it's...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.