Re: Inconsistent handling of patterns with backslah (`\`) escaping
Chet Ramey <[email protected]> Mon, 1 Jun 2026 10:39:03 -0400
| Newsgroups | gmane.comp.shells.bash.bugs |
|---|---|
| Organization | ITS, Case Western Reserve University |
| Message-ID | <[email protected]> |
On 6/1/26 9:59 AM, Andrei Borzenkov wrote: > On Mon, Jun 1, 2026 at 4:41 PM Chet Ramey <[email protected]> wrote: >> >> On 6/1/26 4:08 AM, Andrei Borzenkov wrote: >> >>>> Because '\*' is not a glob, so filename expansion is not performed. >>>> >>> >>> If this is not a glob, I expect '\' to be stripped (quote removal) >>> before the result is used in the command. >> >> Quote removal doesn't apply to the results of expansion, only to quoting >> characters in the original word. >> > > There is no result of expansion as no expansion was performed because > bash decided that the original word had quoted characters and skipped > expansion. What? The `pattern' is the result of a variable expansion. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
(application/pgp-signature, 203 B)
-----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQR8ATX7CIqvbGbGULm7WGnwZOp0qwUCah2ZhwUDAAAAAAAKCRC7WGnwZOp0q+Eo AJ4kuxTtnC1S5dr8UMnAnBseViEAUACfWt6heLzHns+420u8CLNayGmcbG0= =OgCS -----END PGP SIGNATURE-----