|
Home > Archive > Oracle Server > May 2005 > awk & escape character
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
awk & escape character
|
|
|
| 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
| |
| Ed Prochak 2005-05-25, 1:23 pm |
| I have no idea off had, suggest comp.lang.awk for your next try.
Ed
(since moving to PERL, I haven't written an awk script in about 9 or 10
years.)
| |
| Maxim Demenko 2005-05-25, 1:23 pm |
|
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
| |
|
|
|
|
|