New answers tagged

1

You could use select. First, set $PS3 for the prompt, and then, use select like a loop, breaking when you have correct data to get the desired information: PS3="Choose a theme zip file to install:" select theme_file in *.zip; do [[ -f "$theme_file" ]] && break done echo "Installing ${theme_file%.zip} from ${theme_file}..."



Top 50 recent answers are included