[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] tests: Don't add extra padding if counter mod 40 is 0



On 03/20/2010 11:14 AM, Matthias Bolte wrote:
>    if test "$verbose" = "0" ; then
>      mod=`eval "expr \( $counter + 1 \) % 40"`
> -    for i in `seq $mod 40`
> -    do
> -      echo -n " "
> -    done
> +    if test "$mod" != "0" -a "$mod" != "1" ; then

test cond1 -a cond2 is not portable.  Use test cond1 && test cond2.

> +      for i in `seq $mod 40`
> +      do
> +        echo -n " "

echo -n is not portable (although you didn't introduce its use).  Use
printf ' ' instead.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]