Join GitHub today
Episode 07: find name pattern can be glob expanded, needs quotes #1031
Sorry to intrude again.
After some research it's possible this is my first known encounter with unwanted "globbing". Please advise. Is this due to the shell not finding the wildcard pattern in the current working directory, but the
What did you expect to happen?
Is it reasonable to mention how wildcard expansion in the shell is affected by matches in the current working directory? As this might not even be "globbing" I'm way out of my comfort zone here. But something like:
This is a great lesson and (IMO) already pretty advanced. I'm only bringing this up because it's the first thing that happened to me when trying use these tools and work outside the lesson.
Please feel free to close this issue.
Hi, thanks for the detailed diagnosis. The issue is indeed that the shell is expanding the "*.txt" glob before it gets passed to find, causing problems.
The calls to find should be wrapped with quotes to prevent glob expansion, this is a BUG :)
As for adding a warning, I think maintainers will have to think about that a bit more, but we should fix the find at least