extract string
Whelan, Paul
Paul.Whelan at fmr.com
Tue Jan 10 11:57:01 EST 2006
Like so: cat abc.txt | cut -d, -f3
Thanks.
-----Original Message-----
From: Zhao Peng [mailto:greenmt at gmail.com]
Sent: Tuesday, January 10, 2006 11:51 AM
To: gnhlug-discuss at mail.gnhlug.org
Subject: extract string
Hi
Suppose that I have a file called abc.txt, which contains the following
5 lines (columns are delimited by ",")
"name","age","school"
"jerry" ,"21","univ of Vermont"
"jesse","28","Dartmouth college"
"jack","18","univ of Penn"
"john","20","univ of south Florida"
My OS is RedHat Enterprise, how could I extract the string which
contains "univ" and create an output file called def.txt, which only has
3 following lines:
univ of Vermont
univ of Penn
univ of south Florida
Please suggest the simplest command line approach.
Thank you.
Zhao
_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss at mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss
More information about the gnhlug-discuss
mailing list