Search found 1973 matches
- 26 Jun 2013 03:24
- Forum: DOS Batch Forum
- Topic: Efficiently passing multiple switches to a batch file?
- Replies: 6
- Views: 7805
Re: Efficiently passing multiple switches to a batch file?
Using the set command on all parameter and doing string operations on it is a real good idea Squashman. Up to now i did it in similar way as Aacini has done it. But you may max your idea out: @echo off setlocal rem Erase all existent variables to show the created ones at end for /F "delims==&qu...
- 25 Jun 2013 19:41
- Forum: DOS Batch Forum
- Topic: Return character of specific position in a line
- Replies: 16
- Views: 13749
Re: Return character of specific position in a line
Hi, i hope this post is not too late, but i think the efficiency could be improved by using the buffer capacity of STDIN and STDERR, the match.txt receives the redirected output of STDIN and nomatch.txt that of STDERR. This solution advantages are: - not to use more than one file handle per outputfi...
- 24 Jun 2013 16:07
- Forum: DOS Batch Forum
- Topic: new findstr bug
- Replies: 20
- Views: 26233
Re: new findstr bug
I have thought of sending the following as private message, but if 50% of posters have problems with what i wrote, there may be much more readers with the same problem, so i have decided to post this. I'm not sure what problem you have with these two examples, so i try a detailed explanation of: 1) ...
- 24 Jun 2013 07:52
- Forum: DOS Batch Forum
- Topic: new findstr bug
- Replies: 20
- Views: 26233
Re: new findstr bug
@Squashman I think the real question is why does it work when it is not Quoted but does not work when it is quoted. This is easy: the unquoted version produces two chars (the <nul part produces it). You can make it visible by creating a file named piped.bat with the following content: @echo off setl...
- 24 Jun 2013 07:21
- Forum: DOS Batch Forum
- Topic: new findstr bug
- Replies: 20
- Views: 26233
Re: new findstr bug
Sry, for this misunderstanding, it was meant as you say it then:You are making it sound like the SET command is executed once for each ECHO in the FOR loop
The FOR loop executes all the iterations before it moves on to the SET command.
- 24 Jun 2013 06:44
- Forum: DOS Batch Forum
- Topic: new findstr bug
- Replies: 20
- Views: 26233
Re: new findstr bug
Yes, the set command should be executed after the echo commands in the for loop. Their output form a multiline document with only one invalid line at the end. It's the same Sponge Belly does in the opening post using the command type. I have written an own version just to change the number of lines ...
- 23 Jun 2013 18:30
- Forum: DOS Batch Forum
- Topic: new findstr bug
- Replies: 20
- Views: 26233
Re: new findstr bug
These examples should only show, that this error handling is done per line,
not only on the first char in the pipe:
-the upper version interrupts execution, and so ignores the single char at the last line, while
-the lower version is fully executed.
not only on the first char in the pipe:
-the upper version interrupts execution, and so ignores the single char at the last line, while
-the lower version is fully executed.
- 23 Jun 2013 17:30
- Forum: DOS Batch Forum
- Topic: new findstr bug
- Replies: 20
- Views: 26233
Re: new findstr bug
Hi there, i'm sorry, but i'm sure that this is not a bug in findstr. Somewhen in 2001 or 2002 i have read how findstr handles redirected input within the XP dos shell - it's long ago, so i can't remember the link address; and i havn't found it in actual MSDN - sry for that - but i'm sure that it was...