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: [mg29431] Re: [mg29406] Reading, Modifying,and Writing a file with data with quotation marks
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Tue, 19 Jun 2001 05:35:46 -0400 (EDT)
  • References: <200106180739.DAA14296@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

The problem doesn't appear to be difficult, and it's just a matter of
playing around with string operations. I have only two questions:
1. Your modifications are too casuistic. E.g., "place two "0"'s after
"21.87" on the first line". Is this the file going to be modified only once,
or do you have a more general rule for the modifications?
2. Is the modified file going to be used in Mathematica, or once it is
modified it goes back for use with other applications (if so, it could be
modified with, say, Excel or other such program)?

Tomas Garza
Mexico City

----- Original Message -----
From: "JOHN C ERB" <JOHN_C_ERB at prodigy.net>
To: mathgroup at smc.vnet.net
Subject: [mg29431] [mg29406] Reading, Modifying,and Writing a file with data with
quotation marks


> 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: MathML
  • Next by Date: Re: Reading, Modifying, and Writing a file with data with quotation marks
  • Previous by thread: 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