Hi guys,
I'm working on 5000 files and trying to write a script that would take care of all of them. This is part of the script:
I was trying to do something like this [without any effect]
where the input and output files would be automated for numbers from 0000 to 5000 or more - so the script would join files with n and n+1 in the names.
Any suggestions on how to do this or what kind of command should I use?
input1
I have one more question - I'm using this script to count an average but it counts it after every line. How should I change, so that it would only overwrite one line with the ultimate average?
input
output
HTML Code:
Average for msd_name0000+00001= 5,79846
Average for name0000+00001= 2,92024
Average for name0000+00001= 5,04156
Average for name0000+00001= 4,12809
First part works like a charm, thanks!
I have a little problem with the second part- I didn't explane it well enough - sorry!
The OUT file should be storage file for all calculated averages, and it would be nice if I could use script like this:
and at the end the file would look like this:
Quote:
Average for calc_snap0000.pdb.OW.msd_snap0001.pdb.OW.msd= 0,276676
Average for calc_snap0001.pdb.OW.msd_snap0002.pdb.OW.msd= 0,776676
Average for calc_snap0002.pdb.OW.msd_snap0003.pdb.OW.msd= 0,576676
Average for calc_snap0003.pdb.OW.msd_snap0004.pdb.OW.msd= 5,276676
Average for calc_snap0004.pdb.OW.msd_snap0005.pdb.OW.msd= 3,276676
Average for calc_snap0005.pdb.OW.msd_snap0006.pdb.OW.msd= 0,376676
It looks like the 0002 file has every line unique...
Quote:
One more thing... After running the script I noticed that unfortunately the join command doesn't work properly - joint files 0001_0002 and 0002_0003 are empty, probably the 0002 file causes problems.
Quote:
Average for calc_name0000.pdb.OW.msd_name0001.pdb.OW.msd= 58,8237
Average for calc_name0001.pdb.OW.msd_name0002.pdb.OW.msd=
Average for calc_name0002.pdb.OW.msd_name0003.pdb.OW.msd=
Average for calc_name0003.pdb.OW.msd_name0004.pdb.OW.msd= 67,8626
Average for calc_name0004.pdb.OW.msd_name0005.pdb.OW.msd= 63,5823
Here are examples of files that are going into the join command:
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
If you look at the permissions associated with a symbolic link, it has universal access. Does this lead to... (0 Replies)
I recently posted this and the answer I received was helpful, but here's my dilemma now:
I have a script that makes a call like this in ksh initially, but it also doesn an ssh to another machine to do the same. the default shell is bash on there. Is there a command universal to ksh and bash... (1 Reply)
Hi,
I'm looking for one portable disk for unix to take, for example, data on solaris file system and put it on hp file system.
Any idea where can I find this?
Thanks a lot,
Sergio (3 Replies)
Is it possible to use Other Distro's ( i.e Debian's or Ubuntu's ) repositories in Fedora?
If not then what should be done to make common repositories for all linux distros.
regards,
Arun Maurya (2 Replies)