Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

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


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

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 ]
dpb

Posts: 8,208
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
3/21/13
Read Re: replace the first line
dpb
3/21/13
Read Re: replace the first line
dpb

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

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.