Grabbing html text with @line

Oct 14, 2015
7
0
Trying to grab a line from an html file using @line but the < and/or > characters on the line seem to be causing the function to fail.

Example:

[C:\Users\dawolfe\Desktop]echo %@line[0,test1.txt]
TCC: (Sys) The parameter is incorrect.
"%@line[0,test1.txt]"

First line of the file contains:

<sdfgsdfgsdw4>

Is there a way of making this work?
 
Last edited:
May 20, 2008
9,536
64
Syracuse, NY, USA
Trying to grab a line from an html file using @line but the < and/or > characters on the line seem to be causing the function to fail.

Example:

[C:\Users\dawolfe\Desktop]echo %@line[0,test1.txt]
TCC: (Sys) The parameter is incorrect.
"%@line[0,test1.txt]"

First line of the file contains:

<sdfgsdfgsdw4>

Is there a way of making this work?
The correct syntax is @line[test1.txt,0] (the filename first). But that will also fail because of the redirection symbols (<,>).

You could
Code:
v:\> setdos /x-6 & echo %@line[test1.txt,0] & setdos /x+6
<sdfgsdfgsdw4>
That specifically targets the redirection characters. I suspect that other difficulties would arise in HTML files (like %, for example).