Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Simply put, Help! (I can't figure out what's going on here.)

May
855
0
As I often do, a dump of two commands and their results:
Code:
[Z:\]TestRemoveDuplicateLinesParameters.btm  |& Tee CON: !>>&TestRemoveDuplicateLinesParameters.txt
RemoveDuplicateLines 1abc0-2abc9

Start Column: 1
  Type: Range
  End Column: 2
  Length: 2
Error: No valid start-of-range column specified in range specification "1abc0-2abc9"
Error: Unexpected character(s) "abc0-2abc9" found ether in or after start of range
.
Error: Unexpected character(s) "abc9" found ether in or after end column.
Program is ending due to error(s)


RemoveDuplicateLines /Invalid

Error: Unknown keyword parameter "/Invalid".
Program is ending due to error(s)
...

[Z:\]fd TestRemoveDuplicateLinesParametersII.txt
 1/07/2014  9:58  0  TestRemoveDuplicateLinesParametersII.txt
Obviously, the output file doesn't contain what should be in it.

By the way, "fd" is an alias that I wrote that is simply:
Code:
*Dir /A-D /H /K /M
 
Sorry, but I can't even make wild guesses - there is no code to review. All messages appear to come from the program you are executing, not from TCC. I presume you used the TEE command so that both standard output AND standard error go to two destinations: console and the file TestRemoveDuplicateLinesParameters.txt. BTW, once you merged them in the pipe, they are just standard output. After you recorded them in that file, you displayed the size of a different file - you modified the name by adding roman numeral 2 (II) to the name. Those extra long file names are too long to handle reasonably, that's why people use abbreviations... Only copy and paste can make sure no mistyping! I suspect that is your frustration... but I don't know.
 
Guys, there's nothing there beyond what you see above, a rather ordinary batch file (sample code below) that executes a completely straightforward program (written in C++ if that makes any difference) that does no I/O of any kind whatsoever other than to "decode" a parameter passed in and send the result(s) of that decoding to either standard error or standard output depending upon whether the parameter is correct or not.
Code:
@Echo Off
RemoveDuplicateLines /I:Force.An.Error 10-20
RemoveDuplicateLines /I:Force.An.Error 10  -20
RemoveDuplicateLines /I:Force.An.Error 10-  20
RemoveDuplicateLines /I:Force.An.Error 10  -  20
... (many more lines of a similar nature)...
I will note that this used to work, its failure was very sudden (but complete).
 
Excuse me, guys, but I sent the output to the wrong (not as intended) file, and Steve identified that fact. (This is just a statement of the facts; I am not looking for sympathy: Unfortunately I am half-blind and rather stupid because of brain damage the occurred to me several years ago which is the major reason that I no longer visit this board on a regular basis. I think the final results of these postings, and pretty much everything else that I now write, is clear and understandable without mistakes. What is not obvious is just how long it takes me to get them that way; even my typing now sucks as the saying goes.)
 
Did you notice that in the sample in the original post the file written by piping / rediretcion is NOT the same as tested with the fd alias? Of course, it may be an error in the report, not the original...
 
Guys, Steve correctly identified the problem: I was sending the output of the batch file to the wrong file. Thank you. (I am not looking for sympathy here, just stating the facts: Unfortunately I am now half-blind and rather stupid because of brain damage that occurred to me several years ago, the main reason I no longer frequent this board on a regular basis. I think the final results or what I write have at least mostly correct spelling and grammar and that they make sense in making the point that I am trying make. What is not obvious from reading them is just how long it took me to get them that way; even my typing now sucks. In fact, this is the second time I am entering this, somehow I (stupidly!) deleted my first attempt at composing and actually posting this reply.) (And yet another example of just what I am talking about; Steve sent me a reply while I was typing my previous reply so I thought my previous reply had been lost when I didn't see it at the bottom of the thread and was now reposting it.)
 

Similar threads

Back
Top