>and pad it out in a shell script so that it is always the same length
>for the next field to line up.
>(with a tab I will not always get the same column, sometimes I need 1,
>other times 2 for a shortname) how can I determine whether I need 1 or 2
>in a shell script?
>
>No, use buildin things of sh(1). This runs much faster than the awk(1) example.
> while :
> do
> case "${field}" in
> ??????????*)
> break;;
> esac
> field="${field} "
> done
>Now ${field} is at least 10 charcters long (the '*' at the end of ?????????? avoids infinite loops).
>The above loop should pad field with the right number of spaces to make it 10 characters long. You can get unexpected results if field already containted more than 10 chars or some funny chars like tabs or newlines,...
>Pawel Nabe PaN Super Sonic Software Service
>
Thanks to everyone who replied, this was the best solution as it does