From 60fdc31e3307700498bc9e7af6f4d0fd2e7bac85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=A1s=20A=2E=20Ortega?= Date: Sat, 23 Apr 2016 12:36:32 +0200 Subject: [PATCH] Added the basic structure to the script. --- ogg-converter.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/ogg-converter.sh b/ogg-converter.sh index e286660..5ed2bde 100755 --- a/ogg-converter.sh +++ b/ogg-converter.sh @@ -4,5 +4,19 @@ for f in $@ do - echo "Converting $f to $f.ogg" + OUTFILE=${f:0:-4} + echo "Convert $f to $OUTFILE.ogg" + while true + do + read -p "Do you wish to continue? (y/n) " ANSWER + case $ANSWER in + [yY]* ) echo "Convert file." + break;; + + [nN]* ) echo "Skipped file $f" + break;; + + * ) echo "Please enter a valid option." + esac + done done