Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

variable replacement bash zero padding

for num in {1..5}
do
   value=$(printf "%02d" $num)
   ... Use $value for your purposes
done
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #variable #replacement #bash #padding
ADD COMMENT
Topic
Name
8+8 =