1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#!/bin/sh count=1 cond=0 if [ -f "$1" ]; then mount "$1" /mnt/1 -o loop $cond = 1 else while [ "$cond" != "1" ] do if [ -f "$1$count" ]; then mount "$1$count" /mnt/$count -o loop else cond=1 fi let count=count+1 done fi