Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Nov 2002 00:29:59 -0500
From:      "Bob Hall" <rjhalljr@starpower.net>
To:        FreeBSD Questions List <freebsd-questions@freebsd.org>
Subject:   Re: Bash programming; Was: connecting to SCSI drive
Message-ID:  <20021122052959.GA611@sten.alder.net>
In-Reply-To: <20021121094112.GR77198@freepuppy.bellavista.cz>
References:  <20021120180314.GA564@sten.alder.net> <20021120182423.GB30909@dan.emsphone.com> <3DDBE4A9.5060708@mac.com> <20021120204738.GA949@sten.alder.net> <20021121071713.GA2641@sten.alder.net> <20021121094112.GR77198@freepuppy.bellavista.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Nov 21, 2002 at 10:41:13AM +0100, Roman Neuhauser wrote:
>     MSG=$(sudo mount ... 2>&1)
>     if [ $? -ne 0 -a $MSG == "Device not configured" ]; then
>         echo "My custom error message"
>     fi

Thanks. The one thing I never thought to try was putting '2>&1' 
*inside* the parentheses. It makes sense, now that I know about it.

Bob Hall

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021122052959.GA611>