# # power_vs_pass # # get # filed power vs the number of passes in an optical cavity. # if test $# -ne 1 then echo usage: `basename $0` ELFIN_outputfile exit fi grep '=' $1 | \ egrep 'Repetition|fractional gain' |\ awk -F"=" ' BEGIN{ flg = 1 printf ("# %16s %16s\n", "Pass_Number", "Fractinal_Gain" ); } $0 ~ /Repetition/{ if(flg == 0){ printf("%16d %16e\n", rep, gain ) } rep = $2 ; flg = 1 } $0 ~ /fractional gain/{ gain = $2 flg = 0 } '