Chet Ramey wrote:

> Here's the deal.  Only single quotes and backslashes quote the history
> expansion character.  Double quotes don't matter ...
Then why do they cause a difference in behaviour?

> Since ! is not one of the characters for which Posix says the backslash
> will act as an escape, the rest of the word expansions leave it alone.

Then why does “\!” act as “!” under any circumstances at all?

> This is explained pretty well in the HISTORY EXPANSION section of the
> manual page.

Do you mean this sentence from section 9.3: “Only ‘\’ and ‘'’ may be used to
escape the history expansion character”. How exactly does that explain why
there is a difference inside versus outside double-quotes?



Reply via email to