[CentOS] Semi-OT: awk
m.roth at 5-cent.us
m.roth at 5-cent.usFri Apr 29 14:31:51 UTC 2016
- Previous message: [CentOS] OT, security: if you're in the US, and like your dentist, call them, *now*
- Next message: [CentOS] Semi-OT: awk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This is odd, and annoying. CentOS 6, current. Here's my awk script:
{
room = substr($0, 48, 10);
arr[$2,room,$1] = $0;
}
END {
for ( i in arr ) {
for ( j in arr[i] ) {
for ( k in arr[i][j] ) {
print arr[i][j][k];
}
}
}
}
And when I run it, it complains
awk -f awksort proplist7
awk: awksort:7: for ( j in arr[i] ) {
awk: awksort:7: ^ syntax error
awk: awksort:8: for ( k in arr[i,j] ) {
awk: awksort:8: ^ syntax error
awk: awksort:9: print arr[i][j][k];
awk: awksort:9: ^ syntax error
which makes no sense - I've done this a million times. Am I missing
something, or is this a bug?
mark
- Previous message: [CentOS] OT, security: if you're in the US, and like your dentist, call them, *now*
- Next message: [CentOS] Semi-OT: awk
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list