Here's a simple loop demonstrating the use of some printf formatting:
location="IS HOME"; sep="--"
for i in "THE COW" "THE DOG" "THE BOAT" "THE AARDVARK"; do
printf "%-14s %s %s\n" "$i" "$sep" "$location"
So, the printf statement expects 3 arguments:
followed by the newline \n
The formatting results in the following:
%-14s = makes a padded string 14 chars long, left justified.
%s = makes a string exactly as is given to printf.
root@reactor: for i in "THE COW" "THE DOG" "THE BOAT" "THE AARDVARK"; do printf "%-14s %s %s\n" "$i" "$sep" "$location"; done
THE COW -- IS HOME
THE DOG -- IS HOME
THE BOAT -- IS HOME
THE AARDVARK -- IS HOME
You can play around with the formatting codes to shift the padding left or right (left or right justify). And you should be able to easily enough figure out at least one way to move the "IS HOME" further to the right if you want.
There are man pages for printf, but they don't go into great detail about all the formatting codes you can possibly use. Search for a good online resource for this if you need more.