Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Columns and awk

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi

I have a file with entries like this :

dodo:123:tata:pepe
didi:234:tata:yoho

I would like to use awk so it can parse the first column
and print only 'dodo' and 'didi'
Can anybody help me ?
thx
 
Cheapest would be

cut -d&quot;:&quot; -f1 < input

or awk

awk -F&quot;:&quot; '{print $1}' < input Cheers,
ND [smile]

bigoldbulldog@hotmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top