I am trying to iterate a sequence of numbers , the postal codes in Spain is from 01001 to 52080 and I have the following code.
#!/bin/bash
for (( c=01001; c<=52080; c++ ))
do
echo "$c"
done
But I have a problem , I need to add a 0 when the length of the numbers are four.
How can I do this ?
{
"countryName" : "Spain" ,
"numPostalCodes" : 37866 ,
"countryCode" : "ES" ,
"maxPostalCode" : "52080" ,
"minPostalCode" : "01001"
}
Regards !