Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2006 17:11:55 -0500
From:      Chuck Swiger <cswiger@mac.com>
To:        Ensel Sharon <user@dhp.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: shell scripting question (mdconfig device choosing)
Message-ID:  <43D6A62B.80001@mac.com>
In-Reply-To: <Pine.LNX.4.21.0601241650570.8684-100000@shell.dhp.com>
References:  <Pine.LNX.4.21.0601241650570.8684-100000@shell.dhp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Ensel Sharon wrote:
> and I know how to use awk to strip away the leading "md" from each piece
> of the output ... but I do not know how to take output like:
> 
> 8 9 11 14
> 
> and decide that the lowest available number is "0".  How can I do this ?

% echo '9 8 11 14' | sort -nt ' ' | head -1
8

-- 
-Chuck



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