Try one of these one-liners (they have the same output, but I thought the second might be a little easier to understand):
perl -ple '($_) = /^\S+/g' filename perl -ple '$_ = (/^\S+/g)[0]' filename
Basically, it reads a line, then sets it to the first group of non-whitespace stuff at the beginning of the line, and then prints the changed line out. Hope this helps!
His Royal Cheeziness
In reply to Re: Grabbing first column of text
by CheeseLord
in thread Grabbing first column of text
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |