I am writing a batch script that reads a file of HTML code line-by-line and looks for a certain string in a certain position. After reading each line with:
I extract the portion of the line that I'm looking for with:
If I then compare the extracted string to the string I desire using ==, I get the correct result:
That is, the above code returns only the lines in which the desired string appears at the desired position. However, if I use EQ (or even EQC), I get spurious, erroneous results:
That is, the above code returns lines that do not contain the desired string in the desired position.
The help file documentation (Take Command / TCC Help v.22) says that == and EQ are equivalent, but in my code this does not appear to be the case. I would appreciate it if someone would please explain to me what's going on here. MIght EQ and EQC not be working properly because I have to use the SETDOS command with parameter /x-567 to read the HTML code file? Or is this a bug? Or is the documentation is simply wrong? Or am I doing something wrong?
Thank you.
Code:
set t="%@fileread[%h]"
I extract the portion of the line that I'm looking for with:
Code:
set p=%@instr[19,15,%t]
If I then compare the extracted string to the string I desire using ==, I get the correct result:
Code:
iff "%p" == "SmallDataHeader" then ...
That is, the above code returns only the lines in which the desired string appears at the desired position. However, if I use EQ (or even EQC), I get spurious, erroneous results:
Code:
iff "%p" EQ "SmallDataHeader" then ...
That is, the above code returns lines that do not contain the desired string in the desired position.
The help file documentation (Take Command / TCC Help v.22) says that == and EQ are equivalent, but in my code this does not appear to be the case. I would appreciate it if someone would please explain to me what's going on here. MIght EQ and EQC not be working properly because I have to use the SETDOS command with parameter /x-567 to read the HTML code file? Or is this a bug? Or is the documentation is simply wrong? Or am I doing something wrong?
Thank you.