Using redirect for input instead of command line

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:

value1=$1
value2=$2
print $value1 $value2

Running from command line:

fred.sh 1 2 1 2

Contents of file fred.txt:

1 2

Running from command line:

fred.sh

Try

xargs fred.sh < fred.txt

HI

$ cat fred.txt
1
2
$ cat fred.sh
#!/bin/ksh

read value1
read value2
print $value1 $value2
$ ./fred.sh < fred.txt
1 2

Very cool xargs worked perfectly! Was not able to get ./fred.sh to accept input either. Thanks for help guys.