#!/bin/csh -f set A_LIST=( 5.60 5.55 5.50 5.45 5.40 5.35 5.30 5.25 5.20 ) rm analysis/CrAFM.dat rm analysis/CrNMG.dat specx < in/CrFMG.in > out/CrFMG.out fmg < crafm foreach A ( ${A_LIST} ) sed 's/'ABOHR'/'${A}'/g' template/CrAFM0.in > in/CrAFM_${A}.in specx < in/CrAFM_${A}.in > out/CrAFM_${A}.out sed 's/'ABOHR'/'${A}'/g' template/CrNMG0.in > in/CrNMG_${A}.in specx < in/CrNMG_${A}.in > out/CrNMG_${A}.out sed -e '$d' data/crafm.info | sed -n '$p' >> analysis/CrAFM.dat sed -e '$d' data/crnmg.info | sed -n '$p' >> analysis/CrNMG.dat end grep "spin moment" out/CrAFM_*.out | awk 'NR % 4 == 1;NR % 4 == 2'