Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: awk & escape character

Re: awk & escape character

From: Maxim Demenko <mdemenko_at_gmail.com>
Date: 25 May 2005 11:10:06 -0700
Message-ID: <1117044606.078171.69100@g44g2000cwa.googlegroups.com>

Tom76 schrieb:
> how do i define an escape character in awk. i am using awk at the unix
> command line.
>
> cat a.list |awk 'BEGIN {} {a=a"'"$1"',"} END{print a }'
> ^
> ^
> |
> |
> I want to print the single quote within the double quote.
>
> i know this is off-topic, but most of us use awk one time or other. so
> thought to put it here. Thanks

may be you are looking for
cat a.list |awk 'BEGIN {} {a=a"\x27"$1"\x27,"} END

Best regards

Maxim Received on Wed May 25 2005 - 13:10:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US