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!

awk&print 1

Status
Not open for further replies.

gillou

Technical User
Jun 26, 2002
11
FR
Hi,
my problem is that i can't have "'" in my output, for example : awk '{printf "'%s'\n",$1}' file
to have something like : 'Field#1'
\',"'","''"... doesn't work (even with command print).

Thanks a lot !
 
nawk -v q="'" '{printf "%c%s%c\n",q,$1,q}' file
 
GREAT !
It workes, thank you very much !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top