In my folder, filenames are like this:
A00001
A00002
.
.
.
A08525
I want to add this file name as an argument:
max = 8525
for i in `seq 2 $max`
do
python script.py -r filename
done
I tried like this:
max = 8525
for i in `seq 2 $max`
do
python script.py -r "A0000$i" #But this work for 1-9 like wise for A000 it will work for 100-999
done
I can not do
for file in A*;
do
echo "$file"; done
done
Because the folder has the same file with three different extensions, like A0000.txt, A0000.pdf, A0000.png, and I want to input only A0000 as an argument.
How can I write the for loop so that I can read all filenames?
for file in A*; do echo "$file"; done?A0000.txt A0000.pdf A0000.pngand I want to input onlyA0000without extensionmax=8525; spaces are not allowed.