Make a list in bash out of arguments

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

$# will give you the no of arguments passed to the script
so instead of while loop use for loop

list=
for i in $* ; do
list=$list" ./myfile."$i
done
echo "$list"

Thanks for your answer!!

I will try that right now. However, there is one more thing: in reality I want to skip the first argument. I know I can use a "if" condition so that if $i == 1, then I do nothing.
Is there a nicer way to force the "for" loop to start with i=2 ?

list=
shift
for i in $* ; do
list=$list" ./myfile."$i
done
echo "$list"

Perfect! Thanks!!