Cloud Stack Ninja

I'm writing a bash script to get some podcasts. The problem is that some of the podcast numbers are one digits while others are two/three digits, therefore I need to pad them to make them all 3 digits.

I tried the following:


n = printf %03d $n


but the variable 'n' doesn't stay padded permanently. How can I make it permanent?

Read more here:

Content Attribution

This content was originally published by baxter at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: