2 ms·
won't this echo "*" if there are no files in the directory? I always have to look up the 'safe iteration' invocation when iterating files in a directory, becau
by samatman 6y ago
won't this echo "*" if there are no files in the directory?
I always have to look up the 'safe iteration' invocation when iterating files in a directory, because it involves jumping through a few more hoops than is really reasonable.
- eMSF 6y agoYes. You can change the behaviour in bash by setting the nullglob option (shopt -s nullglob).
- deleted 6y ago[deleted]