Re: Inconsistent handling of patterns with backslah (`\`) escaping
Duncan Roe <[email protected]> Mon, 1 Jun 2026 19:40:47 +1000
| Newsgroups | gmane.comp.shells.bash.bugs |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Jun 01, 2026 at 10:53:08AM +0200, Andreas Schwab wrote: > On Jun 01 2026, Duncan Roe wrote: > > > There's actually a real bug in here: > > > > | 16:25:38$ bar='\**' > > | 16:25:43$ echo $bar > > | \** > > | 16:25:51$ touch '*' > > | 16:26:08$ echo $bar > > | * > > > > > > The behaviour of `echo $bar` changed after `touch '*'`. > > File name expansion always depends on the contents of the file system. > > -- > Andreas Schwab, SUSE Labs, [email protected] > GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 > "And now for something completely different." > Oh, right :\