Date: Fri, 23 Mar 2007 20:05:15 +0100 From: =?ISO-8859-1?Q?S=F8ren_Klintrup?= <soren@klintrup.dk> To: freebsd-proliant@FreeBSD.ORG, soren@klintrup.dk Subject: Re: HP Proliant SmartArray nagios check Message-ID: <460424EB.8020401@klintrup.dk> In-Reply-To: <200703211324.l2LDOHg4075482@lurza.secnetix.de> References: <200703211324.l2LDOHg4075482@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?460424EB.8020401>