Quoting quotes in awk

Ken Turkowski ken at turtlevax.UUCP
Tue Mar 4 13:36:18 AEST 1986


How does one quote quotes in awk?  I'd like to do something like the following:

	print doit "\"" last0 "\"", "\"" $0 "\"" | "sh"

I.e. I want to pipe output to a program, putting quotes around some of
the arguments so they don't get interpreted by the shell.  Alternatively,
I'd like to execute the program "doit" with arguments determined from
the awk program:

	print "" | doit "\"" last0 "\"", "\"" $0 "\""

Can someone give me some ideas on how to do this?
-- 
Ken Turkowski @ CIMLINC, Menlo Park, CA
UUCP: {amd,decwrl,hplabs,seismo,spar}!turtlevax!ken
ARPA: turtlevax!ken at DECWRL.DEC.COM



More information about the Comp.unix mailing list