Re: [CentOS] Semi-OT: awk

2016-04-29 Thread J Martin Rushton
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 29/04/16 18:14, Jon LaBadie wrote: > On Fri, Apr 29, 2016 at 10:31:51AM -0400, m.r...@5-cent.us wrote: >> 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

Re: [CentOS] Semi-OT: awk

2016-04-29 Thread Jon LaBadie
On Fri, Apr 29, 2016 at 10:31:51AM -0400, m.r...@5-cent.us wrote: > 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] )

[CentOS] Semi-OT: awk

2016-04-29 Thread m . roth
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