Scripting Question
Corey Bettenhausen
corey at 31415926535.com
Sat Feb 14 03:07:07 UTC 2009
Patton Echols wrote:
> I have a fairly massive flat file, comma delimited, that I want to
> extract info from. Specifically, I want to extract the first and last
[snip]
Check out awk, particularly the -F switch to pluck out the desired
fields. The grep for the "@" to make sure the email addresses exist.
Something like:
awk -F"," '{print $1,$4,$6}' file.txt | grep "@" > out_file.txt
-Corey
More information about the ubuntu-users
mailing list