Mike... what would happen if you did a:
gawk "{print 'word' }"
or
gawk "{print \"word\" }"
(the idea being for the command line interpreter to know what double
quote belongs to IT and what quote belongs to the statement within the
command line)
Good luck,
danny
________________________________
From: geeksthatgawk@yahoogroups.com
[mailto:geeksthatgawk@yahoogroups.com] On Behalf Of spillikinaerospace
Sent: Wednesday, July 05, 2006 10:15 PM
To: geeksthatgawk@yahoogroups.com
Subject: Re: [Geeks that Gawk] mawk: print command with special
characters?
> Try this (use \\\")
>
> gawk "BEGIN {print \"\\\"hello\\\"\"}"
> "hello"
HASTA LA VISTA ***BABY***
that was my silver bullet! i tried variants on what you wrote and
finally stumbled on the solution:
i did:
mawk "{print $1, \"\\\"\"}"
and it did:
"
YES! i'm not gonna waste my time trying to decipher the logic of it,
just thank the Lord that it works. and it only takes 8 characters to
specify that one character!
now i have one more problem though. i want to print a literal string
constant. it won't do it:
i do:
mawk "{print "word"}"
and it does:
.... nothing! no errors, but no output either. am i doin something
wrong?
mike
BTW, i'm on 98se, mawk 1.22x
This email may contain confidential and privileged material for the sole use of
the intended recipient(s) and only for those purposes previously or herein
authorized by the sender. Any review, use, distribution or disclosure by others,
or use by the recipient for unauthorized purposes, is strictly prohibited. If
you are not the intended recipient (or authorized to receive for the recipient),
please contact the sender by reply email and delete all copies of this message.
[Non-text portions of this message have been removed]