From owner-freebsd-proliant@FreeBSD.ORG Fri Mar 23 19:26:48 2007 Return-Path: X-Original-To: freebsd-proliant@FreeBSD.ORG Delivered-To: freebsd-proliant@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7D51716A403 for ; Fri, 23 Mar 2007 19:26:48 +0000 (UTC) (envelope-from soren@klintrup.dk) Received: from mail01.hemligt.net (mail01.hemligt.net [87.48.247.181]) by mx1.freebsd.org (Postfix) with ESMTP id 318B313C4B0 for ; Fri, 23 Mar 2007 19:26:47 +0000 (UTC) (envelope-from soren@klintrup.dk) Received: from localhost (unknown [172.21.203.81]) by mail01.hemligt.net (Postfix) with ESMTP id EFF8D325448; Fri, 23 Mar 2007 20:05:13 +0100 (CET) X-Virus-Scanned: amavisd-new at hemligt.net Received: from mail01.hemligt.net ([172.21.203.81]) by localhost (mail01.hemligt.net [172.21.203.81]) (amavisd-new, port 10024) with ESMTP id 2Z5ROiVKRFEn; Fri, 23 Mar 2007 20:05:06 +0100 (CET) Received: from [172.21.203.26] (unknown [172.21.203.26]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail01.hemligt.net (Postfix) with ESMTP id 638463250D8; Fri, 23 Mar 2007 20:05:06 +0100 (CET) Message-ID: <460424EB.8020401@klintrup.dk> Date: Fri, 23 Mar 2007 20:05:15 +0100 From: =?ISO-8859-1?Q?S=F8ren_Klintrup?= User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: freebsd-proliant@FreeBSD.ORG, soren@klintrup.dk References: <200703211324.l2LDOHg4075482@lurza.secnetix.de> In-Reply-To: <200703211324.l2LDOHg4075482@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: Re: HP Proliant SmartArray nagios check X-BeenThere: freebsd-proliant@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion of FreeBSD on HP ProLiant server platforms." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Mar 2007 19:26:48 -0000 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