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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

awk question

Status
Not open for further replies.

cmancre

Programmer
Jan 30, 2005
35
PT

hello, a got this code that returns me the first colum off the file, but he change colum with space, i want to change colum with another char, like ";"

/usr/bin/awk '{ print $0 }' file

example: a;b;c;d

this will return "a" and not the full line

thanks
 
awk -F';' '{print $1}' file

You may also consider the cut command.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 

lol i think "cut" is more easy, im a bit spleppy today. Thanks anyway.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top