I ran this command at the DOS prompt:
for /f %f in (mylist.txt) do search -name -i *.* -dir D:\Temp\PPM9422 %f
and got this error. What does it mean?
It looks like it reads the values from mylist.txt but is expecting something else to do the search. Thanks
D:\Temp\PPM9422>for /f %f in (mylist.txt) do search -i *.* -dir D:\Temp\PPM9422 %f
D:\Temp\PPM9422>search -i *.* -dir D:\Temp\PPM9422 jury
C:\Perl\bin\search.bat internal error: Quantifier follows nothing in regex; marked by <-- HERE in m/
* <-- HERE .*/ at (eval 3) line 238.
D:\Temp\PPM9422>search -i *.* -dir D:\Temp\PPM9422 MSDN
C:\Perl\bin\search.bat internal error: Quantifier follows nothing in regex; marked by <-- HERE in m/
* <-- HERE .*/ at (eval 3) line 238.
where search.bat line 238 reads
if ($arg =~ m/^-(i?)(d?)skip$/) {
local($i) = $1 eq 'i';
local($d) = $2 eq 'd';
$! = 2, die qq/$0: expecting glob arg to -$arg\n/ unless @ARGV;
foreach (split(/\s+/, shift @ARGV)) {
if ($d) {
$idskip{$_}=1 if $i;
$dskip{$_}=1;
} else {
$iskip{$_}=1 if $i;
$skip{$_}=1;
}
}
next;
I did the search -help and could not figure it out.
D:\Temp\PPM9422>search -help
usage: C:\Perl\bin\search.bat options -e PerlRegex ....
OPTIONS TELLING *WHERE* TO SEARCH:
-dir DIR start search at the named directory (default is current dir).
-xdev stay on starting file system.
-sort sort the files in each directory before processing.
-nolinks don't follow symbolic links.
OPTIONS TELLING WHICH FILES TO EVEN CONSIDER:
-mtime # consider files modified > # days ago (-# for < # days old)
-newer FILE consider files modified more recently than FILE (also -older)
-name GLOB consider files whose name matches pattern (also -regex).
-skip GLOB opposite of -name: identifies files to not consider.
-path GLOB like -name, but for files whose whole path is described.
-dpath/-dregex/-dskip versions for selecting or pruning directories.
-all don't skip any files marked to be skipped by the startup file.
-x<SPECIAL> (see manual, and/or try -showrc).
-why report why a file isn't checked (also implied by -vvvv).
OPTIONS TELLING WHAT TO DO WITH FILES THAT WILL BE CONSIDERED:
-f | -find just list files (PerlRegex ignored). Default is to grep them.
-ff | -ffind Does a faster -find (implies -find -all -dorep)
OPTIONS CONTROLLING HOW THE SEARCH IS DONE (AND WHAT IS PRINTED):
-l | -list only list files with matches, not the lines themselves.
-nice | -nnice print more "human readable" output.
-n prefix each output line with its line number in the file.
-h don't prefix output lines with file name.
-u also look "inside" manpage-style underlined text
-i do case-insensitive searching.
-w match words only (as defined by perl's \b).
OTHER OPTIONS:
-v, -vv, -vvv various levels of message verbosity.
-e end of options (in case a regex looks like an option).
-showrc show what the rc file sets, then exit.
-norc don't load the rc file.
-dorep check files with multiple hard links multiple times.
Use -v -help for more verbose help.
This script file is also a man page.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.