rem example pipe
echo off
:10
set /a a1=%random:~1,1%
set /a b1=%random:~1,1%
set /a c1=%random:~1,1%
set /a d1=%random:~1,1%
for %%x in (%a1%,%b1%,%c1%,%d1%) do for %%y in (%a1%,%b1%,%c1%,%d1%) do echo %%z > pippo.txt| set /a z=%%x*%%y
goto 10
Search found 2 matches
- 09 Aug 2010 12:22
- Forum: DOS Batch Forum
- Topic: Is it possible to pipe an output to a for loop?
- Replies: 4
- Views: 6062
- 07 Aug 2010 12:21
- Forum: DOS Batch Forum
- Topic: Is it possible to pipe an output to a for loop?
- Replies: 4
- Views: 6062
Re: Is it possible to pipe an output to a for loop?
echo off
set a1=1
set b1=2
set c1=1
for %%x in (%a1%,%b1%,%c1%) do echo %%x > pippo.txt| set /a x=%%x+1
set a1=1
set b1=2
set c1=1
for %%x in (%a1%,%b1%,%c1%) do echo %%x > pippo.txt| set /a x=%%x+1