From 750b34b762ee5b95019fdb341ee41ce57e2966d6 Mon Sep 17 00:00:00 2001 From: Colin P. McCabe Date: Mon, 19 Jun 2023 13:02:35 -0700 Subject: [PATCH] music-to-mp3.sh: support multiple arguments --- music-to-mp3.sh | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/music-to-mp3.sh b/music-to-mp3.sh index 0259f7b..2028e48 100755 --- a/music-to-mp3.sh +++ b/music-to-mp3.sh @@ -1,5 +1,6 @@ #!/bin/bash -FILE=$1 -echo "Re-encoding audio from ${FILE}..." -ffmpeg -i "${FILE}" -vn -ac 2 -ar 44100 -ab 220k -f mp3 "${FILE}.mp3" +echo "Re-encoding audio from ${@}..." +for FILE in "$@"; do + ffmpeg -i "${FILE}" -vn -ac 2 -ar 44100 -ab 220k -f mp3 "${FILE}.mp3" +done -- 1.6.6.rc1.39.g9a42