<br><br><div class="gmail_quote">On Thu, May 12, 2011 at 6:45 PM, The Don Lachlan <span dir="ltr">&lt;<a href="http://ale-at-ale.org">ale-at-ale.org</a>@<a href="http://unpopularminds.org">unpopularminds.org</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;"><div class="im">On Thu, May 12, 2011 at 05:57:42PM -0400, Jim Kinney wrote:<br>
&gt; that expects a {binary name} &lt; {input data file}. {input data file} is<br>
&gt; variably named and often 20+MB. Changing {binary name} to work better is<br>
&gt; political (think Fortran 77 base code - someone in charge got their PhD with<br>
&gt; that program).<br>
&gt; so things must work as they are with my little tweaks around the edges.<br>
&gt; until I blow away the decades old mess and start over in C.<br>
<br>
</div>That doesn&#39;t make any sense.<br>
<br>
If the Fortran code expects the data as a stream (that&#39;s what the redirect<br>
does), then why are you trying to get the file name in a shell script? What<br>
is your objective with this?<br></blockquote><div><br>For logging the combination of which fortran binary with which input file I&#39;m simulating parts of a process with a shell script. The fortran code runs for many hours. <br>
<br>FYI:<br><br>     shell variable redirect<br><br>fred=&#39;foo bar&#39;<br>mary=`&lt;${fred}`<br>-bash: ${fred}: ambiguous redirect   <br><br>mary=`cat ${fred}`<br>cat: foo: No such file or directory<br>cat: bar: No such file or directory<br>
<br>    get contents of variable<br>mary=`echo ${fred}`<br>echo $mary<br>foo bar<br><br>    make a file<br>echo &quot;foo bar&quot; &gt;&gt; fred<br>mary=$(&lt;$fred)<br>-bash: $fred: ambiguous redirect<br><br><br>   read file<br>
cat fred<br>foo bar<br><br><br>    redirect file contents to shell variable<br> mary=`&lt;$fred`<br>-bash: $fred: ambiguous redirect<br><br><br>   create a reference (as shell var) to file to have redirect &quot;go through&quot;<br>
john=&#39;fred&#39;<br>mary=`&lt;${john}`<br>echo $mary<br>foo bar<br><br><br>    or just &#39;cat&#39; the damn thing and irritate R. Schwartz again :-)<br>suzy=$(cat ${john})<br>echo $suzy<br>foo bar<br><br>some days computers just suck.<br>
<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5"><br>
-L<br>
_______________________________________________<br>
Ale mailing list<br>
<a href="mailto:Ale@ale.org">Ale@ale.org</a><br>
<a href="http://mail.ale.org/mailman/listinfo/ale" target="_blank">http://mail.ale.org/mailman/listinfo/ale</a><br>
See JOBS, ANNOUNCE and SCHOOLS lists at<br>
<a href="http://mail.ale.org/mailman/listinfo" target="_blank">http://mail.ale.org/mailman/listinfo</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>-- <br>James P. Kinney III<br><br>As long as the general population is passive, apathetic, diverted to 
consumerism or hatred of the vulnerable, then the powerful can do as 
they please, and those who survive will be left to contemplate the 
outcome.<br>- <i><i><i><i>2011 Noam Chomsky</i></i></i></i><br>