4 ms·
Not claiming to be an expert here but I typically do this when confronted with a large number of files. Instead of: command * for i in [someregex]* do comma
by larrys 12y ago
Not claiming to be an expert here but I typically do this when
confronted with a large number of files.
Instead of: command *
for i in [someregex]*
do
command $i
done
I know I could also do command [someregex]* but
like the comfort of having each item echo back to the
terminal so I know the progress.
- andreasvc 12y agoThat still relies on the shell expanding a glob of millions of files. Another method is to use 'find' and 'xargs' to avoid specifying the files as arguments explicitly.