3

Using redirect for input instead of command line

view full story
linux-howto

http://www.unix.com – I have a script that is working when I input parameters from the command line. I was under the assumption that i could use a redirect for the input. script fred.sh: Code: value1=$1 value2=$2 print $value1 $value2 Running from command line: Code: fred.sh 1 2 1 2 Contents of file fred.txt: Code: 1 2 Running from command line: Code: fred.sh Moderator's Comments: Please don't write it all away in one line and use carriage return/enter. That makes reading texts much easie (HowTos)