<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Here's how I would do it with saclst in bash.<br><br>kztime=`saclst kztime f sacfile_name | gawk '{print $2}'`<br><br>Januka.<br><br><div style="color: rgb(162, 162, 162);"><strong><font style="font-style: italic;" size="2"><font class="Apple-style-span" face="garamond, 'new york', times, serif">Serenity isn't freedom from the storm, but peace within the storm</font></font><font class="Apple-style-span" face="garamond, 'new york', times, serif"><br></font></strong></div>  <div style="color: rgb(162, 162, 162);"><font size="2"><strong><font class="Apple-style-span" face="garamond, 'new york', times, serif">Januka Attanayake&nbsp;</font></strong></font></div>  <div style="color: rgb(162, 162, 162);"><font size="2"><strong><font class="Apple-style-span" face="garamond, 'new york', times, serif">Global Seismology &amp; Economics<br>The University of Connecticut
 <br>Beach Hall - U2045<br>354, Mansfield Rd; <br>Storrs, CT 06269<br></font></strong></font><font size="2"><strong style="font-weight: bold;"><font class="Apple-style-span" face="garamond, 'new york', times, serif">Tel :&nbsp; 860 486 0475 (Office)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font></strong><strong style="font-weight: bold;"><font class="Apple-style-span" face="garamond, 'new york', times, serif">&nbsp; 860 486 3914 (Lab - P405)<br></font></strong></font></div>    <div style="color: rgb(134, 135, 164); font-family: times new roman,new york,times,serif;"><font size="2"><span style="color: rgb(139, 139, 139); font-weight: bold;"><font class="Apple-style-span" face="garamond, 'new york', times, serif">URL:&nbsp;</font><a rel="nofollow" target="_blank" href="http://sites.google.com/site/janukaattanayake/"><font class="Apple-style-span" face="garamond, 'new york', times,
 serif">http://sites.google.com/site/janukaattanayake/</font></a></span></font><div><font class="Apple-style-span" color="#a2a2a2"><br></font><br><br><br><br></div></div><br><br>--- On <b>Fri, 10/29/10, Tuna Eken <i>&lt;ekent@gfz-potsdam.de&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Tuna Eken &lt;ekent@gfz-potsdam.de&gt;<br>Subject: [SAC-HELP] A question regarding sac ERROR 907 ...<br>To: sac-help@iris.washington.edu<br>Cc: ekent@gfz-potsdam.de<br>Date: Friday, October 29, 2010, 4:59 AM<br><br><div id="yiv1958415671"><div id="yiv1958415671_htmlarea_default_style_" style="font: 10pt arial,helvetica,sans-serif;">Dear SAC Users,<br><br>I have recently faced with a problem when
processing on the data header of one binary sac data file.<br>To sum it up, when I read and want to list header info, I have got the following type of
error and<br>

the rest :<br><br>&nbsp;ERROR&nbsp; 907: Bad time field entry detected: 22 8 26 1432<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NPTS =
360000<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; B = 0.000000e+00<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; E =
3.599990e+03<br>&nbsp;&nbsp;&nbsp;&nbsp; IFTYPE = TIME SERIES FILE<br>&nbsp;ERROR&nbsp;&nbsp;&nbsp; 0:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LEVEN =
TRUE<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DELTA = 1.000000e-02<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IDEP = VELOCITY (NM/SEC)<br>&nbsp;&nbsp;&nbsp;&nbsp;
DEPMIN = 5.701760e+05<br>&nbsp;&nbsp;&nbsp;&nbsp; DEPMAX = 5.752970e+05<br>&nbsp;ERROR&nbsp;&nbsp;&nbsp; 0:&nbsp;&nbsp;&nbsp;&nbsp; DEPMEN =
5.730679e+05<br>&nbsp;&nbsp;&nbsp;&nbsp; KZDATE = MAR 30 (089), 2007<br>&nbsp;&nbsp;&nbsp;&nbsp; IZTYPE = BEGIN
TIME<br>

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; KSTNM = IPA2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; CMPAZ = 9.000000e+01<br>&nbsp;ERROR&nbsp;&nbsp;&nbsp;
0:&nbsp;&nbsp;&nbsp;&nbsp; CMPINC = 9.000000e+01<br><br>............................................................<div> .......<br><br>Here at
that point KZTIME information is important for my processing and most probably due<br>

to that sort of error I can't see and grep it later on. Is there anyone who has idea how to get<br>the data header fixed or any trick on how to get
KZTIME information despite this error?<br><br>I appreciate any suggestion on this matter ...<br>

<br><br><br>best regards<br><br>tuna</div><br>
-- 
<br>#&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;#&nbsp;&nbsp;&nbsp;&nbsp;#<br>Tuna
Eken<br><br>Helmholtz-Zentrum Potsdam<br>Deutsches GeoForschungsZentrum GFZ<br><br>Telegrafenberg, D 409<br>D-14473 Potsdam/Germany<br>Tel.: +49 331
288-1322<br>Fax: +49 331 288-1328<br>E-Mail: ekent@gfz-potsdam.de</div>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">_______________________________________________<br>sac-help mailing list<br><a ymailto="mailto:sac-help@iris.washington.edu" href="/mc/compose?to=sac-help@iris.washington.edu">sac-help@iris.washington.edu</a><br><a href="http://www.iris.washington.edu/mailman/listinfo/sac-help" target="_blank">http://www.iris.washington.edu/mailman/listinfo/sac-help</a><br></div></blockquote></td></tr></table><br>