passing two variables into a shell script?

Hello all,
i have a infile.txt text file which contains such variables:
aaa 123
asds 1323
asdsd 13434
lkjlkj 324324
23432 lkjlkj
24324 ljlkj
3j4lk 234kj3

and i want to pass them to my script such as:
./myscript $1 $2

where $1 is the first value in the first row and $2 is the second value of the first row and it continues till the end of the file.

whats the best todo it?

Best Regards,

#!/bin/ksh

while read first second junk
do
    myscript "${first}" "${second}"
done < infile.txt

thanks a bunch dude :slight_smile: