How do I check a int variable ($inputNo) to see if it’s 2 or more decimal digits long?
Example:
inputNo="5"
Should be changed to: 05
inputNo="102"
Should be left alone: 102
I thought about using wc
and if
statements, but wc -m
doesn’t seems to give the actual characters passed into wc
, as wc
always seems to give +1 to the characters that is given.
But I don’t know how to add a 0 in front of the current input number.