View Single Post

  #1 (permalink)  
Old 10-31-2007, 03:34 AM
AHJ AHJ is offline
Junior Member
User
 
Join Date: Oct 2007
My distro: Debian
Posts: 1
Rep Power: 0
AHJ is on a distinguished road
Default Read arguments from a file and pass them to binary file

Hello all,
I have a pretty simple script to write, but have never done this before and am having problems. Hope someone will help!

I have a text file that looks like this:
0.001 0.002738613 0.997834325
0.002 0.005477226 0.995668666
0.003 0.008215838 0.993503042
0.004 0.010954451 0.991337467
etc

Each of these values is a parameter that I have to input into a program and get results, i.e.

!/bin/csh
AlphaSim -nx 10 -ny 10 -nz 10 -dx 1 -dy 1 -dz 1 -power -ax 2 -ay 2 -az 2 -zsep {0.001} -rmm {0.002738613} -pthr {0.997834325} -iter 1000 -out power_2x2x2_zsep00{it}.txt

so i need this to run for every row in my text file i.e. i need to input three variables from my text file, pass them as parameters to my program, and iterate until end of text file. I'm having such problems, can anyone help?
Thanks!

Last edited by AHJ; 10-31-2007 at 03:41 AM.
Reply With Quote