I'm using grep 2.5.1 (Cygwin), which is the latest version of gnu
grep I can find for Windows. I'm also including the part of the help
text that explains the usage of the -r (recursive) switch:
-R, -r,
--recursive equivalent to
--directories=recurse
--include=PATTERN files that match PATTERN will be
examined
--exclude=PATTERN files that match PATTERN will be
skipped.
--exclude-from=FILE files
that match PATTERN in FILE will be skipped.
My problem is
that it just doesn't work for me. (I'm using XP SP2.) When I use the
-r switch, I get a 'Not enough space' error. I have no idea what space
it's run out of - I should have plenty of memory available, and the same for
disk space (if it needed it for swapping, whatever). Any help would be
greatly appreciated.
->grep --version
grep (GNU
grep) 2.5.1
Copyright 1988, 1992-1999, 2000, 2001 Free Software
Foundation, Inc.
This is free software; see the source for copying
conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
->grep -rl --include=*.ini
Change
grep: (standard input): Not enough space
I've created an alias in my command processor (4nt) language,
that will go through each folder, and then execute the regular grep command
"grep -s -c -m 1 [string search pattern] [file pattern]" and check to see if it
returns at least one match. If it does, it prints the current directory
and then executes the full grep command "grep -H [...]" so I see the
results. This works fine, but I'd rather figure out what I'm doing wrong
above with the -r switch.
->alias rgrep
global /iq
if %@execstr[grep
-s -c -m 1 %$] GT 0 (echo.%+ echo %=>%=>%=> %_cwd: %+ grep -H
%$)
->rgrep Change *.ini
>>>
C:\WIP\VESTA\Installer\TargetFiles\Common\Demo\INIs\DemoDBs\M1:
VESTA.ini:ChangePasswordLevel=10
>>>
C:\WIP\VESTA\Installer\TargetFiles\Common\Demo\INIs\DemoDBs\Pallas:
VESTA.ini:ChangePasswordLevel=10
>>>
C:\WIP\VESTA\Installer\TargetFiles\Common\Demo\INIs\DemoDBs\Standard:
VESTA.ini:ChangePasswordLevel=10