<br><br><div class="gmail_quote">On Thu, May 12, 2011 at 6:45 PM, The Don Lachlan <span dir="ltr"><<a href="http://ale-at-ale.org">ale-at-ale.org</a>@<a href="http://unpopularminds.org">unpopularminds.org</a>></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>
> that expects a {binary name} < {input data file}. {input data file} is<br>
> variably named and often 20+MB. Changing {binary name} to work better is<br>
> political (think Fortran 77 base code - someone in charge got their PhD with<br>
> that program).<br>
> so things must work as they are with my little tweaks around the edges.<br>
> until I blow away the decades old mess and start over in C.<br>
<br>
</div>That doesn't make any sense.<br>
<br>
If the Fortran code expects the data as a stream (that'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'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='foo bar'<br>mary=`<${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 "foo bar" >> fred<br>mary=$(<$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=`<$fred`<br>-bash: $fred: ambiguous redirect<br><br><br> create a reference (as shell var) to file to have redirect "go through"<br>
john='fred'<br>mary=`<${john}`<br>echo $mary<br>foo bar<br><br><br> or just 'cat' 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>