[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Simple shell scripting
- Subject: [ale] Simple shell scripting
- From: esoteric at 3times25.net (Geoffrey)
- Date: Wed Mar 30 17:16:33 2005
- In-reply-to: <[email protected]>
- References: <[email protected]>
Christopher Fowler wrote:
> I am creating a bootable usb stick and I need to somehow cycle through
> the devices until I get a successful mount. Right now I'm doing it with
> cdrom so I do something like this
>
> mount -t iso9660 /dev/hdb /cd || mount -t iso9660 /dev/hdc /cd
>
> What would be good loop that could do this for me?
I'm not exactly sure what you're looking to do, but maybe:
for hd in hda hdb hdc hdd hde hdf hdg; do
mount -t iso9660 /dev/$hd /cd && break
done
--
Until later, Geoffrey