gene golub a écrit :
Hi folks
Can you help me: how to print quote with 'print' stm in awk.
Gene.
it depends, if you are running a plain awk file using #!/usr/bin/awk,
print "'" should work
if you are running an awk script through shell as awk '...', some
solutions are :
# the one I prefer
awk -v q="'" '{print q "helo" q}'
# a lot complicated
awk 'BEGIN { q="'"'"'" } { print q "helo" q }'
# see man ascii
awk 'BEGIN { q="\047" } { print q "helo" q }'
awk '{ print "\047helo\047" }'
Regards,
Cyrille Lefevre
--
mailto:[EMAIL PROTECTED]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users