Hi again, <br>I&#39;ve had a couple of responses from the members, thanks for your time! However, none of them worked. I still get the same error. I am calling sac within a while read line loop. Should there be a special way of calling sac and executing commands if I do it in a loop? I haven&#39;t come across this problem with other programs like GMT and taup at all.<br>
<br>my error msg: SAC&gt; readline: readline_callback_read_char() called with no handler!<br><br>and bash script:<br><br>while read line<br>do<br>    cd $line<br>   <br>        sac<br>        gawk &#39;{print &quot;macro ../sac_cut.macro&quot;}&#39;<br>
<br>    cd ../<br>
done &lt; folder_list.txt <br><br>commands I&#39;ve tried so far:<br><br>       (1) echo -e &quot;macro ../sac_cut.macro&quot; | sac<br><br>       (2) sac &lt;&lt; EOF and  !<br>            macro ../sac_cut.macro<br>            EOF and !      ==&gt; doesn&#39;t work within a while loop<br>
<br>       (3) printf  &quot;macro ../sac_cut.macro&quot; | sac<br>       (4) echo  &quot;macro ../sac_cut.macro&quot; | sac<br><br><br>Thanks again !<br><br>Januka.<br><br><div class="gmail_quote">On Mon, Oct 25, 2010 at 12:20 PM, Januka Attanayake <span dir="ltr">&lt;<a href="mailto:jattanayake@gmail.com">jattanayake@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Greetings, <br>I am trying to call sac within a shell script as follows. <br><br>while read line<br>
do<br>    cd $line<br>   <br>        sac<br>        gawk &#39;{print &quot;macro ../sac_cut.macro&quot;}&#39;<br><br>    cd ../<br>
done &lt; folder_list.txt <br><br><br>folder_list.txt holds the names of all the directory names that the script is suppose to look in. <br>I see that sac is initiated but the problem is in executing commands within sac once it is initiated. I have tried several ways of doing that including printf and piping to sac with back quotes. Still I get the following error. <br>

<br>SAC&gt; readline: readline_callback_read_char() called with no handler!<br><br>How should one execute sac commands within a shell script? <br><br>I am using sac Version 101.3b<br><br>Thanks a lot.<br><font color="#888888"><br>
Januka.<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>&quot;Nothing can start to exist nor can cease to exist, only transformation is possible&quot;<br><br>Januka Attanayake<br>Solid Earth Geophysics &amp; Economics<br>
University of Connecticut<br>Beach Hall   U-2045<br>354,Mansfield Rd;<br>Storrs.CT 06269<br><br>Tel: +1 860 486 0475 (Office)<br>      +1 860 486 3914 (Lab - P405)<br>URL: <a href="http://sites.google.com/site/janukaattanayake/">http://sites.google.com/site/janukaattanayake/</a><br>
<br>