#Format the id to 5-digit i=$(echo $i | awk '{ printf("%05d\n", $0) }') echo "$i" >> $OUTPUT_DIR/progress