[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] The GNU Awk User's Guide:1.1.6> Shell-Quoting Issues
From: |
Aharon Robbins |
Subject: |
Re: [bug-gawk] The GNU Awk User's Guide:1.1.6> Shell-Quoting Issues |
Date: |
Sat, 05 Jan 2013 20:03:51 +0200 |
User-agent: |
Heirloom mailx 12.5 6/20/10 |
Greetings. Thank you for taking the time to report a concern.
> Date: Sat, 05 Jan 2013 22:42:31 +0800
> From: ???? <address@hidden>
> To: address@hidden, address@hidden
> Subject: [bug-gawk] The GNU Awk User's Guide:1.1.6> Shell-Quoting Issues
>
> Hi,
> I'm a novice to awk, and find the awk user's guide at gnu web, the
> link is like below:
> http://www.gnu.org/software/gawk/manual/gawk.html
>
> My system is ubuntu, details like below:
> ubuntu 12.04.1 LTS
>
> My gawk version is like below:
> GNU Awk 3.1.8
Please note that the online version of the manual documents the latest
release, 4.0.2, which has features not in 3.1.8
> A little issue I encountered is when I read the The GNU Awk User's
> Guide:1.1.6> Shell-Quoting Issues, the guide says:
>
> / $ awk "BEGIN { print \"Don't Panic!\" }"//
> // -| Don't Panic!/
>
> However, when I write the same thing into my termial,
>
> / address@hidden:~/tmp$ gawk "BEGIN { print \"Don't Panic!\" }"//
> // bash: !\": event not found/
>
> and I work around this issue using the below command,
>
> address@hidden:~/tmp$ gawk "BEGIN { print \"Don't Panic\!\" }"
> gawk: warning: escape sequence `\!' treated as plain `!'
> Don't Panic!
>
> I think '!' is a sensitive sign to bash.
This is true.
>
> Best wishes to you from Jianchao.li(??????) Shenzhen city,
> Guangdong province, China Mainland.
Your point is addressed in the documentation. If you look at:
http://www.gnu.org/software/gawk/manual/html_node/Read-Terminal.html#Read-Terminal
You will see the following:
If you use Bash as your shell, you should execute the command
'set +H' before running this program interactively, to disable
the C shell-style command history, which treats '!' as a special
character. We recommend putting this command into your personal
startup file.
Thanks,
Arnold