((var++))where var is the name of your variable. In a loop:
i=1 for orig in `ls *.jpg`; do padded=`printf '%03d' $i` mv $orig $padded.jpg ((i++)) done
((var++))where var is the name of your variable. In a loop:
i=1 for orig in `ls *.jpg`; do padded=`printf '%03d' $i` mv $orig $padded.jpg ((i++)) done