Created
April 1, 2021 17:30
-
-
Save geoffyuen/950a7d024c6d7a84ea9e28fcd67024df to your computer and use it in GitHub Desktop.
dumb ia-rcade menu for bash
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
mames(){ | |
ls -l ~/mame/roms | |
local IFS=$'\n' | |
echo "Search for: " | |
read inp | |
echo . | |
local PS3="Type a number: " | |
select file in $(mame -listfull|grep -i "$inp") | |
do | |
# get first word from selected string/line using awk | |
local y=$(echo "$file" | awk '{print $1;}') | |
ia-rcade $y | |
break | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment