views:

26

answers:

1

Hello everybody,

Does anybody know a unix command to select columns from a tab delimited-file based on their respective names (something like "cut" but that would accept column names) ? I'm not looking for any perl/awk onliner obfuscating code but more for a dedicated command. Thanks

+1  A: 

There's nothing in the POSIX command set that does that.

Awk is the right tool for the job if you want to stick with things that are likely to be available on any system. Otherwise, you're going to have to do some shell gymnastics to convert your column names into numbers and then use cut(1) to do the work.

Blrfl