
19 Apr
2005
19 Apr
'05
11:47 a.m.
And if you put that little one liner in a script or alias I'm sure it can be very helpful. Incidentally I stumbled across join while looking for neat utils. I figured fold was easier for newbies to digest. But yes, join is neat.
Ooh, my favourite is "join(1)"[1] with a bit of join(1), cut(1), grep(1) you can do basic rdbms queries on text files. The thing to remember about join is it requires both input files to be sorted on the key.
an example join command:
w | awk '{print $1}' | sort | join -j 1 -t: -o 2.5 - <(getent passwd | sort)
-- Oliver Jones » Roving Code Warrior oliver(a)deeperdesign.com » +64 (21) 41 2238 » www.deeperdesign.com