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

-F problem

Status
Not open for further replies.

stu78

Programmer
May 29, 2002
121
GB
Hi,

I want to use a Field Seperator of a directory structure;

like;

awk -F/opt/folder '{print}' file

How can I get this to work?

DC
 
Have you tried quoting it?
Code:
awk -F[b]"[/b]/opt/folder[b]"[/b] '{print}' file


 
nawk ' BEGIN { FS="/opt/folder"; }
{ printf "%s-%s\n",$1,$2; } ' file
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top