bug-bash
[Top][All Lists]
Advanced

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

Re: Inconsistence when checking if a pattern is quoted or not for `==' a


From: Andreas Schwab
Subject: Re: Inconsistence when checking if a pattern is quoted or not for `==' and `=~' in [[ ]]
Date: Thu, 17 Feb 2011 17:05:41 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Greg Wooledge <address@hidden> writes:

> I think you're all missing what Clark's question actually is.  Consider
> this:
>
> imadev:~$ cat <<\EOF
>> $PATH
>> EOF 
> $PATH
>
> The use of a backslash in front of one of the characters of the
> here-document's sentinel word is considered "quoting".  And because the
> sentinel word is "quoted", parameter expansions in the body are not done.

The backslash does not quote the here document, it quotes the first
character of the delimiter.  A (unquoted) backslash always quotes
exactly one character.

Andreas.

-- 
Andreas Schwab, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

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