bug-bash
[Top][All Lists]
Advanced

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

Re: {# - strange behavior


From: Chet Ramey
Subject: Re: {# - strange behavior
Date: Sat, 21 Feb 2009 17:37:42 -0500
User-agent: Thunderbird 2.0.0.19 (Macintosh/20081209)

Antonio Macchi wrote:
> 
> thanks... but parameters expansions and printf builtin works differently
> about it...
> 
> 
> 
> 
> $ locale | grep LC_CTYPE
> LC_CTYPE="en_US.UTF-8"
> 
> $ a=eèèèe
> 
> $ b=eeeee
> 
> $ echo ${#a}
> 5
> 
> $ echo ${#b}
> 5
> 
> $ printf "*%-10s*" $a
> *eèèèe  *
> 
> $ printf "*%-10s*" $b
> *eeeee     *
> 
> 
> 
> 
> is it ok?

Yes, it's ok.  Posix says that printf field widths are specified in number
of bytes.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]