Advertisement
Guest User

Power of sed

a guest
Nov 12th, 2014
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.04 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. ## Created by Taufiq Hassan
  4. # Email:: taufiq@gist.ac.kr
  5. export work_dir=${PWD}
  6. export LD_LIBRARY_PATH=/usr/local/lib
  7.  
  8. m=0.67
  9. o=67
  10. for n in 0.67 0.68 0.69 0.70
  11. do
  12. rm exe*
  13. rm *.o
  14. echo 'Starting MACR run for: ' $n+.01
  15. echo '============================================================================'
  16. echo 'This message purpose is to define the starting point the the Model run'
  17. echo 'Please check the my_driver.f90 file for correct input in SSA after this message'
  18. echo 'Please standby while the process finishes'
  19. echo 'This may take a while...'
  20. echo '============================================================================'
  21. # Changing SSA value and the output file name
  22.   sed -i "s/^ASY=$m/ASY=$n+.01/" asy_run_driver.f90
  23.   sed -i "s/^OPEN (276,FILE='ASY_$o.data'/OPEN (276,FILE='ASY_$((o+=1)).data'/" asy_run_driver.f90
  24. make
  25. mpirun -np 12 ./exe1
  26. echo '_____________________________Completed____________________________________'
  27. echo '=====Please check the '$o'.data file for correct output information======='
  28. m=$n+.01
  29. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement