Skip to content

Instantly share code, notes, and snippets.

@timofurrer
Created February 6, 2013 09:10
Show Gist options
  • Save timofurrer/4721337 to your computer and use it in GitHub Desktop.
Save timofurrer/4721337 to your computer and use it in GitHub Desktop.
bash select menu example (choose block device which matches pattern /dev/sd?)
#!/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