Q
qanda
Hi all
I want to process lots of files (too many for the shell to expand on
one line) so I use readdir instead of glob. If I know the file glob
to use such as file*.ext I can put this directly into the grep ...
local @ARGV = grep /file.*\.ext/, readir CURDIR;
My question is how can I take a file glob on the command line and
transform it into an expression for grep. I suppose this also implies
we must prevent the shell from expanding by quoting the expression
such as myscript *file*.ext"
Thanks.
I want to process lots of files (too many for the shell to expand on
one line) so I use readdir instead of glob. If I know the file glob
to use such as file*.ext I can put this directly into the grep ...
local @ARGV = grep /file.*\.ext/, readir CURDIR;
My question is how can I take a file glob on the command line and
transform it into an expression for grep. I suppose this also implies
we must prevent the shell from expanding by quoting the expression
such as myscript *file*.ext"
Thanks.