Parsing data and retaining the full length of variable

Here's is an example of what I want to do:

var1="Horse "
var2="Cat "
var3="Fish "

for animals in "$var1" "$var2" "$var3"
do
set $animals
pet=$1
## Ok, now I want to get the values of $pet, but
## I want to retain the full length it was originally in
## var1, var2 or var3, say it was 10 bytes. If I then do
## the following:
echo "$pet : "
The printing of this(the colons in this example) will not line up:
Horse :
Cat :
Fish :

I think I have done this before, but it is Friday and my brain is fried.....any help would make my weekend!

Thanks

you need to double quote all those variables carrying animals including the positional parameter $1...

try this...

    var1="Horse     " 
    var2="Cat       " 
    var3="Fish      " 

    for animals in "$var1" "$var2" "$var3"
    do
       set "$animals"
       pet="$1"
       echo "$pet :"
    done

Cheers!
Vishnu.

"Thanks"

Also, see if you have the printf command... it's internal in some shells, and can be found as a standalone binary on some systems. You can specify field width...