I keep a list of all RFC's on my workstation for some idle reading, and use a script to diplay a topic for the number I supply. The format they're in is: rfc####.txt, where the extra spaces are padded by "0"'s. I came up with this simple little routine to pad the left side of the number with zero's until I get a total of 4 characters:
Code:
...
numcheck=$((`echo $num | wc -c` - 1))
until [ "$numcheck" = "4" ]; do
num="0${num}"
numcheck=$((`echo $num | wc -c` - 1))
done
rcfname=rfc${num}.txt
...
This may not be the best way to do it, but it works for my needs... Please post back if you want more help with this.
HTH