HP Proliant SmartArray nagios check

Søren Klintrup soren at klintrup.dk
Fri Mar 23 19:26:48 UTC 2007


Oliver Fromme wrote:

> Very careful here.  Character rages like the above are
> locale-dependant.  They are only guaranteed to work as
> expected in the C locale.  Try this:
> 
> $ export LANG=lt_LT.ISO8859-4
> $ echo FOOBAR | tr A-Z a-z
> f¿¿baq
> 
> Therefore character ranges should be avoided in scripts.
> They break for people with certain locale settings.
> The portable solution is to use character classes:
> 
> $ echo FOOBAR | tr '[:upper:]' '[:lower:]'
> foobar
> 
> Details can be found in the tr(1) manual page which
> explains the problem with A-Z a-z.

Thanks a lot, I read the manpage and changed the script accordingly :).

Regards,

Søren


More information about the freebsd-proliant mailing list