bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sorry--this is my question


From: Roman Rakus
Subject: Re: sorry--this is my question
Date: Tue, 26 Jul 2011 15:49:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc15 Thunderbird/3.1.11

On 07/23/2011 02:17 PM, Joachim Schmitz wrote:
Jan Schampera wrote:
On 22.07.2011 18:12, the mad doctor kaeding wrote:
is this a bug?

echo goodbye\ cruel\ world\!
goodbye cruel world!
echo "goodbye cruel world!"
bash: !": event not found
echo "goodbye cruel world\!"
goodbye cruel world\!


No, this is a specific history expansion in interactive shells.

Execute ''set +H'' and try again (it's disabled in non-interactive
shells).

Or use single quotes:

echo 'goodbye cruel world!'

double quotes only prevent filename expansion, but allow interpretation of other Shell meta-characters
Not true. Double qutes remove special meaning of characters except `$', `\', and, when history expansion is enabled, `!'. Meta characters loses its special meaning.

Note: `!' is usual history expansion character, but can be a different character.

RR

Bye, Jojo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]