mperezi
2/9/2019 - 7:46 AM

Select an option with default

echo -en "Directory ~/bin already exists, overwrite it? [Y/n]: "
read -n 1 action; echo
case "$action" in
    '')   ;&
    [Yy]) rm -rf ~/bin;;
    *)    echo "Skipping directory ~/bin";;
esac