Debian Codegraph @

commissioning/processlog.csh

raw
1 #! /bin/csh
2 # Pull only the pysynphot commands out of an ETC logfile
3 # *** Run this first, then run the resulting .txt file through
4 # *** gencases.py.
5 #.....................................................................
6 #Get the input filename
7 if ( "$1" == "" ) then
8 echo -n "Enter filename: "
9 set fname = $<
10 else
11 set fname = $1
12 endif
13
14 #Create the output filename
15 set outname=`echo $fname | sed 's/\.log$/.txt/' `
16
17 #Pull out only the pysynphot commands & send them to the output file.
18 grep command $fname | awk '{print $4}' > $outname