Created
February 6, 2013 09:10
-
-
Save timofurrer/4721337 to your computer and use it in GitHub Desktop.
bash select menu example (choose block device which matches pattern /dev/sd?)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PS3="Choose device: " | |
select dev in /dev/sd? | |
do | |
echo you picked device $dev \($REPLY\) | |
break | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment