I have a simple test script my_script<br><br>#!/bin/bash<br># this is a crap script<br>myout="$2"'.crap'<br>directions=$(cat $2)<br>echo "$myout"<br>echo "$directions"<br>exit<br><br clear="all">
It is launched by:<br><br>./my_script < test1.dat<br><br>which is a file containing one line<br>/tmp/<br><br>which will be used later once the I/O issue is corrected.<br>This is being done to replicate a much larger scenario<br>
<br>When it is run, the output is:<br>.crap<br>/tmp/<br><br>Notice that the file I want to be named test1.dat.carp is only named .crap<br><br>I need to get the name of the input file into the script itself somehow. Positional parameters as not doing it.<br>
<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>