how to reduce a length in a file?

i want to reduce a length in the file called text

in the file im having 10 byte length.
want to reduce it to 9 byte length for all lines.

FILENAME=text
cut -c1-9 "$FILENAME" > NEWFILE && mv NEWFILE "$FILENAME"

i have 10 lines

each line contains 10byte length.
but in 5th line have only 9 bytes.
have to increase 5th line into 10 bytes.
how can i do that?

awk '{printf "%-10.10s\N", $0}' "$FILENAME" > NEWFILE && mv NEWFILE "$FILENAME"

can you please explain how this script works

printf "%-10.10s ...

%-10.10s -- means "left-justified, at least 10 chars, max of 10 chars, string