[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please help parsing file [sed, awk, fortran, bash]



I didnt mean to say this was oo programming, only that my background is in strictly scientific computing using structured programming in c and fortran. this rarely requires doing any formating work on lines such as this...

as before, the file is from an experimenter who chose the format arbitrarily (maybe the photon counter outputs that, no clue [dont really care]) and Im doing this as a favor.

I will be looking into sed as it seems like a really useful tool.

many thanks to all for your inputs

p.s. doing this from fortran would be a chore...

On Fri, Aug 31, 2012 at 7:58 AM, Gaël DONVAL <gael.donval@cnrs-imn.fr> wrote:
Le vendredi 31 août 2012 à 09:48 -0400, Miles Fidelman a écrit :
> For going through a file, line-by-line, and massaging the format, my
> first instinct would be sed.  That's what it's intended for.

Actually, I did not read the whole thread (shame on me) prior to
answering. I think what is really important here is:
1) Where the data are coming from.
2) What you want to do with your data.

For instance if it is coming from a fortran program and you have the
sources of it, you might want to improve the program directly by adding
a new kind of output to it.

If this is some kind of old files that were generated by a former
version of the program. Then a quick conversion script using anything
you want might do the trick: you'll just have to run it during a limited
time then you will discard it because the newest version of the program
already provides you with relevant output.

If you are aiming at postprocessing your data, just try to stick to the
language(s) you choose for that to parse the file.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: [🔎] 1346425113.7366.12.camel@p76-nom-gd.cnrs-imn.fr" target="_blank">http://lists.debian.org/[🔎] 1346425113.7366.12.camel@p76-nom-gd.cnrs-imn.fr




--
Daniel Jiménez

Reply to: