Re: OT: help with a text file



a7yvm109gf5d1@xxxxxxxxxxx wrote in news:19ee7cde-7010-43a4-85cd-
61ab1859bb8f@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:

On Aug 12, 4:31 pm, John Larkin
<jjlar...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
On Tue, 12 Aug 2008 13:28:26 -0700 (PDT), a7yvm109gf...@xxxxxxxxxxx
wrote:

I figure this group must be full of crusty old school text file
hackers...
Here's the deal, I wish to change a line to something else inside a
pure text file, while leaving the other lines unmolested.
So something that reads the file line by line, if the line doesn't
match my criteria dump the line as is into a new file, if it matches,
substitute my new line, do so until the end of the file.

I used to use GAWK for stuff like this but I have forgotten it all.

TIA

Use search/replace in a text editor?

Crimson Editor is good.

John

Ah, this needs to happen "programmatically", I need to change a line
in the text file, about 3K, while in the batch file, then return the
text file to the initial state.
It is to trick the silly Concept HDL program from Cadence. I can get
it to print the entire schematic to the PDF print driver from the
command line.
To achieve this I set the "input script" parameter to a tiny script
that changes the plotter, prints and exits.
But now everytime I run Concept it does this. So I need to change the
input script back to what it was when I exit the batch file too.
I'm almost there.


Isn't there "file compare" software that does something similar?

Check http://sourceforge.net
.



Relevant Pages

  • Re: OT: help with a text file
    ... It is to trick the silly Concept HDL program from Cadence. ... To achieve this I set the "input script" parameter to a tiny script ... that changes the plotter, prints and exits. ... input script back to what it was when I exit the batch file too. ...
    (sci.electronics.design)
  • Re: OT: help with a text file
    ... To achieve this I set the "input script" parameter to a tiny script ... that changes the plotter, prints and exits. ... input script back to what it was when I exit the batch file too. ... You want a batch file to fetch some text and then fetch some other text and ...
    (sci.electronics.design)