Hello,
I have a very stupid/simple problem, but for some reason I cannot figure out...and I need your help!
I am writting a bash scrip that should be executed using "my_script X Y Z T" where X Y Z and T can be any string, but there can be any number of arguments.
I want my script to do a list from these inputs:
#!/bin/bash
i=1
while [ $i -le $# ]
do
list=$list" ./myfile."$i
i=`expr $i + 1`
done
echo $list
Using the above script, I got:
./myfile.1 ./myfile.2 ./myfile.3 ./myfile.4
instead of:
./myfile.X ./myfile.Y ./myfile.Z ./myfile.T
Thanks for your help