aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtoMp3.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/toMp3.sh b/toMp3.sh
new file mode 100755
index 0000000..fb5256a
--- /dev/null
+++ b/toMp3.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+if [ $# -eq 1 ] ; then
+
+ if expr "$1" : "^.*\.....$" ; then
+ ffmpeg -i "$1" "${1:0:-4}mp3"
+ fi
+ if expr "$1" : "^.*\....$" ; then
+ ffmpeg -i "$1" "${1:0:-3}mp3"
+ fi
+fi