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

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



Hello guys,

@richard,

1 this is not homework, a friend asked me to do some statistics on an experimental dataset he got for his masters thesis and the file was already that way.

2 i'm well versed in fortran, this problem however is not what i'm used to. I thought about reading the line bare in character mode, but thought there should be a more time-efficient (coding time, that is) tool for this type of problem than some 'tab-finding' code in fortran which would just obfuscate my code unnecessarily.

3 apart from R code, I'm not used to object oriented oriented programming and I have only done bash for scripting. I read a bit of the usefulness of perl, awk and sed a while ago but I haven't had the time to get into that yet.

4 I thought reading someone's suggestions (and retyping the proposed code) on this task would be a nice way of learning a few basic concepts on some of these scripting languages. That is why I stated the problem the way I did, for others to understand the problem easily and throw some lines of code at lunch time or something.. I've done that on physics forums for fortran code or bash scripts (which generally automates fortran program runs, archival of datafiles and plotting with gnuplot)

5 The data is from a photon counter, I don't know why it is encoded like that...

@john

I'm having a look at your solution and expect to learn from it. Many thanks!

daniel


Reply to: