shell scripting question (mdconfig device choosing)

Chuck Swiger cswiger at mac.com
Tue Jan 24 14:11:56 PST 2006


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


More information about the freebsd-questions mailing list