Though if the output is redirected to a disk file for other use it will no longer be in a prittyprint form - it will have embeded escape sequences...
Better try something like:
Code:
name="beginning"
value="[ PASSED ]"
blanks=" "
echo "${name}${blanks:${#name}} ${value}"
Where the "blanks" has as many blanks (60 in your case) to get to the columne you want the "[ FAILED ]" (or passed...) text to come out.
The slightly arcane "${blanks:${#name}}" is used to expand the "blanks" string minus the length of the value of the "name" parameter. So the ${#name} evaulates to the number of characters in the name string. Using this length for the offset (ie number of characters to skip) in the blanks string should always put the output in a fixed format that doesn't have escape characters, and is suitable for including in other documents.
Another thing - embedding specific escape sequences in output will not always work. It depends entirely on what terminal emulator you are using as to whether it will be correct or not. It is better to get the appropriate escape sequence by using the tput utility to translate what you want.