Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Output alignment in build.sh



On Tue, Aug 24, 2010 at 05:51:01PM +0700, Robert Elz wrote:
>     Date:        Tue, 24 Aug 2010 02:46:55 -0400
>     From:        christos%zoulas.com@localhost (Christos Zoulas)
>     Message-ID:  <20100824064655.911EA56426%rebar.astron.com@localhost>
> 
> 
>   | +statusmsg2()
>   | +{
>   | + msg="${1}"
>   | + while [ ${#msg} -lt 21 ] ; do
>   | +         msg="${msg} "
>   | + done
>   | + statusmsg "${msg}${2}"
>   | +}

Better (more succinct) - I assume the plan is to pad to 16 chars.
        msg="${msg}                "
        msg="${msg%${msg#????????????????}}"
Although that needs a test to avoid truncating long messages.

        David

-- 
David Laight: david%l8s.co.uk@localhost


Home | Main Index | Thread Index | Old Index