As long as the number of files is not unreasonably large, you could load them into an array, then can call them by address number.
Code:
array=( * )
for (( i=0; i<=${#array[@]}; i+=2 )) ; do
echo "${array[i]} ${array[i+1]}"
done
It assumes that the files sort out properly when globbed though. Try running "
echo *" first to see what order the shell puts them in.
Even better would be to use two arrays, loaded by globs that match the paired filenames.
Code:
array1=( File_*_1 )
array2=( File_*_2 )
for i in "${!array1[@]}"; do
echo "${array1[i]} ${array2[i]}"
done
Assuming the files are all named in the format you posted, they should match up. Do note that filenames with numbers in them sort as ascii strings, rather than integers, so File_10_1 would come before File_1_1. But at least the pairings will come out the same.