[Thread Prev][Thread Next][Index]

Answer:How to extract ASCII string data file header and use as plottitle



Thanks to Mick and Steve, here is one way to extract ASCII string data
file headers and incorporate them into plot titles. (Shown here is for
incorporation into a shell script for quick plots. If one was interested
in accessing file headers within an interactive ferret session, one
could invoke the following with a "spawn" command). Replace
"myplotscript.jnl" with your own  plotting script and set up the
following shell script: ("echo ... >>tmpB.jnl" should be one line)


------------------shellscript run.plotwfileheader----------------------
#!/bin/csh
#extracts file header string and appends a label to top of ferret plot
cat myplotscript.jnl >! tmpB.jnl
echo `head -1 idat121.$1 | awk '{print "ppl %label/nouser 4 6. 0 0 0.2
@P7"$0}' >> tmpB.jnl
ferret -batch HD{$1}BW.ps << EOF >& out.tt
go tmpB $1
quit
EOF
rm -f tmpB.jnl

------------------end of shellscript run.plotwfileheader------------------

cheers

Lev



[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement