diff --git a/to_vp9/to_vp9.sh b/to_vp9/to_vp9.sh index 26b7e69..d0d9fe6 100755 --- a/to_vp9/to_vp9.sh +++ b/to_vp9/to_vp9.sh @@ -38,10 +38,10 @@ done # Choose an encoder while :; do - read -p "Choose an encoder [0]: " encoder + read -r -p "Choose an encoder [0]: " encoder [[ $encoder =~ ^[0-9]+$ ]] || { echo "Enter a valid number"; continue; } if ((encoder >= 0 && encoder < ${#encoders[@]})); then - encoder=$(echo ${encoders[$encoder]} | awk '{print $2}') + encoder=$(echo "${encoders[$encoder]}" | awk '{print $2}') break else echo "Not a valid encoder, try again" @@ -56,7 +56,7 @@ extension="${extension[*]}" extension=${extension// /|} for file in **/*.@($extension); do - echo $encoder + echo "$encoder" #https://wiki.archlinux.org/title/Hardware_video_acceleration