MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Reading, Modifying, and Writing a file with data with quotation marks

  • To: mathgroup at smc.vnet.net
  • Subject: [mg29425] Re: [mg29406] Reading, Modifying, and Writing a file with data with quotation marks
  • From: Mianlai Zhou <lailai at nikhef.nl>
  • Date: Tue, 19 Jun 2001 05:35:40 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi, I think you may use

thelist = ReadList["filename", Word, WordSeparators -> ","]

to read the data from the file. After that you can use Insert[] to insert
some extra elements into the list.

Good luck!

Mianlai Zhou
Theory Group, NIKHEF
Amsterdam, the Netherlands

On Mon, 18 Jun 2001, JOHN C ERB wrote:

> Greetings,
>
> I would like to modify a data file on disk which has
> the data enclosed in quotation marks.
> A much-shortened example would be as follows:
>
> File as stored on disk
>
> "big","left","15","21.87","","0","smy"
> "82","back","up","24","50","0","984"
> "44","","up","symm"
>
> I would like to read this file into Mathematica,
> then (for example), place two "0"'s after "21.87" on the first line,
> place three "0"'s after "50" on the second line, then
> store the result back onto a file on disk giving
>
> "big","left","15","21.87","0","0","","0","smy"
> "82","back","up","24","50","0","0","0","0","984"
> "44","","up","symm"
>
> My stumbling block is mainly the quotation marks.
>
> Thank you,
> John C. Erb
> email: John_C_Erb at prodigy.net
>



  • Prev by Date: Re: How to produce "thick" lines in 3D?
  • Next by Date: RE: Converting Integer to Binary and using bits
  • Previous by thread: Re: Reading, Modifying,and Writing a file with data with quotation marks
  • Next by thread: Re: Reading, Modifying, and Writing a file with data with quotation marks