[Top][All Lists]

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

Escaping the history expansion character

From: Matthew Walker
Subject: Escaping the history expansion character
Date: Mon, 09 Aug 2004 13:55:20 +1200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510

From the bash info page:
  Only `\' and `'' may be used to escape the history expansion

I have tried the following:
  echo '!'   # works fine, displays "!"
  echo "!"   # errors as expected with "event not found"
  echo "\!"  # produces "\!" --- this is my problem

Why is it that "\!" doesn't output just "!"?

For every other scenario "\x" produces "x". Why does this fail for an exclamation mark?

This time I remembered to check the FAQ, so hopefully this isn't a stupid question :o)


reply via email to

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