shell scripting question (mdconfig device choosing)
Ensel Sharon
user at dhp.com
Wed Jan 25 08:31:55 PST 2006
On Wed, 25 Jan 2006, Luke Bakken wrote:
> #!/bin/sh
>
> function find_first_mdevice
> {
> MDDEV='md0 md1 md2 md3 md4 md5 md6 md7 md8 md9'
> MDOUT=`mdconfig -l`
>
> for DEV in $MDDEV
> do
> if ! echo $MDOUT | grep -q $DEV
> then
> break
> fi
> done
> echo $DEV
> }
>
> find_first_mdevice
Thank you so much - I will try it out immediatelty.
More information about the freebsd-questions
mailing list