in reply to Yet Another Split Question
perl -pale '$_=$F[1]'
(update: forgot to mention, in case you didn't know: perldoc perlrun )
(another update: if you're using a Bourne-style shell -- bash, korn, zsh, etc -- you could add something like this to your shell's "rc" file:
This defines a shell function that can be used as follows:pcol() { perl -pale "\$_=\$F[$1]" $2 }
Have fun...)pcol 1 list.file # prints $F[1] (second column) from list.file ls -lg | pcol 4 # prints byte counts of files in cwd
|
|---|