From owner-freebsd-proliant@FreeBSD.ORG Tue Feb 13 21:40:08 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 2B40F16A400 for ; Tue, 13 Feb 2007 21:40:08 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: from mail4out.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) by mx1.freebsd.org (Postfix) with ESMTP id E784413C474 for ; Tue, 13 Feb 2007 21:40:07 +0000 (UTC) (envelope-from edwin@mavetju.org) Received: by mail4out.barnet.com.au (Postfix, from userid 1001) id 094F937BCC4; Wed, 14 Feb 2007 08:40:07 +1100 (EST) X-Viruscan-Id: <45D230360000DB6C7D2DA4@BarNet> Received: from mail4auth.barnet.com.au (mail4.barnet.com.au [202.83.178.125]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mail4.barnet.com.au (Postfix) with ESMTP id CF0544224B0; Wed, 14 Feb 2007 08:40:06 +1100 (EST) Received: from k7.mavetju (k7.mavetju.org [10.251.1.18]) by mail4auth.barnet.com.au (Postfix) with ESMTP id 2D65537B87B; Wed, 14 Feb 2007 08:40:05 +1100 (EST) Received: by k7.mavetju (Postfix, from userid 1001) id 55F772E; Wed, 14 Feb 2007 08:39:59 +1100 (EST) Date: Wed, 14 Feb 2007 08:39:59 +1100 From: Edwin Groothuis To: S?ren Klintrup Message-ID: <20070213213959.GL90772@k7.mavetju> References: <45D1B2B1.3070703@klintrup.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <45D1B2B1.3070703@klintrup.dk> User-Agent: Mutt/1.4.2.1i Cc: freebsd-proliant@freebsd.org 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: Tue, 13 Feb 2007 21:40:08 -0000 On Tue, Feb 13, 2007 at 01:44:33PM +0100, S?ren Klintrup wrote: > More information at http://www.klintrup.dk/soren/proliant/ To overcome the problem of many of [Tt][Hh][Ee][Ss][Ee] kind of string, you can pipe the output through tr(1) so that it at least is human-readable (instead of the minimal requirement of being a cyborg :-) [~] edwin@k7>echo "TtHhEeSsEe" | tr A-Z a-z tthheessee Also, the case statement doesn't have a catch for the case that the variable is "" or not one of the five expected strings. And as the last one, if you use 's/foo/bar/i', it be case insensitive too so the sed statement is easier to write/read/check for humans. But for the rest, works fine! Edwin -- Edwin Groothuis | Personal website: http://www.mavetju.org edwin@mavetju.org | Weblog: http://weblog.barnet.com.au/edwin/