[GTALUG] bash quoting [was Re: Help need in bash]

znoteer at mailbox.org znoteer at mailbox.org
Fri Jun 1 13:14:45 EDT 2018


> Le 1 juin 2018 à 11:10, Lennart Sorensen via talk <talk at gtalug.org> a écrit :
> 
> 
[snip]
> 
> $ for f in "*.png"; do echo "$f"; done
> a b c.png a.png b.png c.png
> 
> $ for f in "*.png"; do echo "$f"; done
> *.png
[snip]

I don't understand what's going on here.  The exact same command is giving two different results?  When I try this on my system, I don't get a single-line listing of the 4 files, but rather the result "*.png" as you did in the second run of the command above.  Is there a typo somewhere?  Did you mean for the two commands above to be the same?

--
znoteer
znoteer at mailbox.org


More information about the talk mailing list