The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: replace the first line
Replies: 3   Last Post: Mar 21, 2013 8:06 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 9,850
Registered: 6/7/07
Re: replace the first line
Posted: Mar 21, 2013 8:06 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 3/21/2013 6:38 PM, Lillian wrote:

> I was trying to create 100 files and all but the first Lind are the same.
> I already wrote the first file and want to create the other 99 files.
> Are there better ways to do this?

Yeah, make one copy of the base file content w/o the first line then
create a new file w/ the initial line and use OS COPY command to copy
the rest to it from the one source.

Or, if the file isn't terribly large, read it all (again w/o the first
line) into memory and then just create each new file, write the specific
line and then the remainder.


Date Subject Author
Read Re: replace the first line
Read Re: replace the first line

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.