[texworks] Feature/enhancement request

Philip Taylor (Hellenic Institute) P.Taylor at Hellenic-Institute.Uk
Sun May 1 20:16:57 CEST 2022


On 01/05/2022 19:08, Duncan Murdoch wrote:
>
> I'm not familiar with the details of CMD's scripting, but the thing 
> I'd worry about is that if it drops blank lines, it might make other 
> undesirable changes as well.  If I was using CMD, I'd probably look 
> for a program like "sed" that was designed for editing.  sed itself is 
> available for Windows; the command to echo all but the first line of 
> input would be
>
>   sed -e 1d < bowls-rr.ta68
>
> or if I wanted to delete all the lines (if any) with % at the start,
>
>   sed -e /^%/d < bowls-rr.ta68
>
> This could be included in a larger .cmd script that went on to run the 
> compiler.
>
> Duncan Murdoch

Thank you for your follow-up and suggestions, Duncan.  Looking at the 
HELP text for FOR, the removal of blank lines is clearly documented :

> Blank lines are skipped.
and there is no evidence of undesirable changes, so I am inclined to 
stick with a pure CMD solution for now.  SED would almost certainly be 
faster, since it is a compiled program rather than an interpreted one, 
but I think that my CMD solution will suffice all the while my programs 
remain of modest size.

-- 
/** Phil./


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://tug.org/pipermail/texworks/attachments/20220501/bb168290/attachment.html>


More information about the texworks mailing list.