Results 1 to 2 of 2
Hi all,
I need some help I have database file that is all over the place. And im trying to just get certain information from it like username and email ...
- 02-14-2011 #1Just Joined!
- Join Date
- May 2008
- Posts
- 38
Need help with cut
Hi all,
I need some help I have database file that is all over the place. And im trying to just get certain information from it like username and email address.
What I want to know is using cut if I did
cut -d"'" -f2 how does that affect the text, does it split it everytime it reaches an ' ?
Could I do somthing like this cut-d"'" -f2 -f3 to get both the second and third word?
Example text
(1,'admin','51a42fa118e77f95f70d4efff4395f8d','bla r','test@blar.com',10,0,'','','','','','',0,'http://www.blar.com/usericons/admin.jpg','',1296966693,'213.243.145.60',12967051 13,1283501911,1296457930,1294556469,1294942812,0,0 ,'','','','','',-1,'P')
Thanks
- 02-14-2011 #2Just Joined!
- Join Date
- Mar 2007
- Location
- Bogotá, Colombia
- Posts
- 39
use awk:
awk -F"," '{print $2" "$3}' yourfile
that will get you both fields enclosed with '


Reply With Quote