Batch commands fail when parsing large text files.
Posted: 10 Aug 2013 00:01
At first I make a large text file:
and test some commands from a batch file
None of them works. But all work usually at the command prompt. Tested with XP and Win8.
The issue is associated with this question at SO.
Why does this not work and is there a workaround?
Thank you.
Code: Select all
(for /l %%a in (1,1,16000) do @echo(0123456789012345678901234567890123456789)>file
and test some commands from a batch file
Code: Select all
@echo off &SETLOCAL
SET section=123"
SET target=456"
SET base=file"
ECHO start
for /F "delims=:" %%a in ('findstr /NC:"%SECTION%" /C:"%TARGET%" "%BASE%"') do ECHO(%%a
find /N "%SECTION%%TARGET%" "%BASE%
sed "/./!d" "%base%"
grep "123" "%base%"
None of them works. But all work usually at the command prompt. Tested with XP and Win8.
The issue is associated with this question at SO.
Why does this not work and is there a workaround?
Thank you.