<div>Oops.. Thanks for pointing that out, that was copy and paste error caused on my side. This is the correct version:<br></div><div><br></div><div>do file wild *SAC<br>setbb vert $file<br>r %vert </div><div>setbb station &amp;1,KSTNM<br>
setbb otime &amp;1,O<br>evaluate to cotime %otime * (-1.0)<br>ch ALLT %cotime IZTYPE IO<br>setbb network &amp;1,KNETWK<br>setbb polezero %polezerod%%station%.%network%.PZ<br>w %vert<br>enddo<br></div><div><br></div><div><br>
</div><div>Also, the SAC version I use is 101.3b</div><div>Sorry about that,</div><div>Igor</div><div><br></div><div class="gmail_quote">On Tue, Jan 26, 2010 at 9:06 PM, Katie Boyle <span dir="ltr">&lt;<a href="mailto:Kboyle@lbl.gov">Kboyle@lbl.gov</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">i&#39;m not sure if it&#39;s causing the error, but you need to separate the read command &quot;r %vert&quot; from the do loop &quot;do file wild *SAC&quot;<br>

<br>
right now they are on the same line...<div class="im"><br>
<br>
&quot; r %vertdo file wild *SAC&quot;<br>
<br></div>
Igor Stubailo wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Dear SAC users,<br>
<br>
Could you please help me to find out what&#39;s wrong with my file reading sequence?<br>
<br>
The code snippet from sac_LHZ.test:<br>
...<br>
do file wild *SAC<br>
setbb vert $file<br>
r %vertdo file wild *SAC<br>
setbb station &amp;1,KSTNM<br>
setbb otime &amp;1,O<br>
evaluate to cotime %otime * (-1.0)<br>
ch ALLT %cotime IZTYPE IO<br>
setbb network &amp;1,KNETWK<br>
setbb polezero %polezerod%%station%.%network%.PZ<br>
w %vert<br>
enddo<br>
...<br>
<br>
The content of the current dir:<br>
PTRP.TO.SAC  LVOF.TO.SAC  MMMR.TO.SAC<br>
<br>
The errors:<br>
&gt;do file wild *SAC<br>
&gt;./tr: line 4: 26622 Segmentation fault sac &lt;&lt;!<br>
&gt;m sac_LHZ.test<br>
&gt;quit<br>
&gt;!<br>
<br>
The script I run:<br>
&gt;cat tr<br>
sac &lt;&lt;!<br>
m sac_LHZ.test<br>
quit<br>
!<br>
<br>
<br>
If I comment out the lines &quot;do file..&quot; and &quot;enddo&quot; and read a single file like:<br>
setbb vert PTRP.TO.SAC<br>
the code continues to execute fine.<br>
So the problem is about using wild with *SAC.<br>
<br>
Thanks,<br>
Igor<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
sac-help mailing list<br>
<a href="mailto:sac-help@iris.washington.edu" target="_blank">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>
  <br>
</blockquote>
<br>
<br>
-- <br>
Katie Boyle<br>
Lawrence Berkeley National Laboratory<br>
510.486.4018<br>
<br>
</blockquote></div><br>