Hi I have a batch file aaa.exe which needs two input parameters:
Usually the command's format likes
aaa 555 10000
But I want to use parameters to do it.
aaa $1 $2
These two parameters come from a text file list.txt
41800497 41801375
41814783 41816135
41814930 41816135
41819987 41820843
41819987 41820914
41823969 41824906
I need a script to do it.
Thanks for help.
yazu
2
What platform do you use? Cygwin?
while read -r a b; do
aaa.exe "$a" "$b"
done < list.txt
If you have a bash script in aaa.exe
awk '{ print "aaa.exe", $1, $2 }' list.txt | sh
while read first second
do
aaa $first $second
done
For understanding :
$cat test
a b
c d
$while read first second ; do echo $first ; done < test
a
c
$while read first second ; do echo $second; done < test
b
d