Subject: Re: bug#59819: Bug Report: [coreutils] echo command interprets wildcards, when read with the 'cat' command from a file, in a for-in loop

From: Andreas Schwab <[email-masked]>
Date: Sun, 04 Dec 2022 18:55:07 +0100

On Dez 04 2022, th3_d0ctor wrote:

> $ echo "*" >b; for i in `cat b`; do echo "$i"; done
> ==> list current working directory instead of printing the wildcard '*'

That's how it is supposed to work, since file name expansion is
performed after all other expansions (just before quote removal).

This is basic shell operation knowledge that everyone using the shell
should remember.

-- 
Andreas Schwab, [email-masked]
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."