do grep foo "$file" done grep: ./\*: No such file or directory \```


One confusing default behavior of globbing, especially because it’s completely different from how regular expressions work, is that globs expand to themselves if there are no matches:


This page is a preview of The newline Guide to Bash Scripting

No discussions yet