-------------------------------------------------------------------------------- Generate Finder Chart -------------------------------------------------------------------------------- Problem: Nadia has a file of sources and wishes to generate finder charts. The program has to read parameters and pass specific values to the finder chart generation program. It then should do a batch generation. The form is $ python mfc.py ra dec source $ cat Source.dat %source ID RA DEC SourceA 1 19.5 -20.5 SourceB 2 200.1 -30.3 #sed: delete comment line #sed: you can also delete blank lines (if any) #awk: print the intended command line #the python program wants column 3, 4 and 1 $ sed '/^%/d;/^ *$/d' | awk '{print "python mfc.py", $3, $4, $1}' python mfc.py 19.5 -20.5 SourceA python mfc.py 200.1 -30.3 SourceB #now execute it with trace on $ sed '/^%/d;/^ *$/d' | awk '{print "python mfc.py", $3, $4, $5}' | sh -x