From d06558144b95b62b86307f16a6c34a6108c403ac Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Wed, 11 Apr 2018 21:47:10 +0200 Subject: [PATCH] mp3car: use printf instead of echo --- audio/mp3car.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/audio/mp3car.sh b/audio/mp3car.sh index d79d4d2..3e3d285 100755 --- a/audio/mp3car.sh +++ b/audio/mp3car.sh @@ -15,7 +15,7 @@ # Dependencies: pacpl, lame if [ $# -lt 1 ] ; then - echo "Usage: $0 [input [...]]" + printf 'Usage: %s [input [...]]\n' "$0" >&2 exit 1 fi @@ -23,11 +23,9 @@ BASEOUTDIR="$HOME/tmp/mp3car" LAMEOPTIONS="-v -b 32 -B 128" for INPUT in "$@" ; do - echo - echo "*** CONVERTING \"$INPUT\" ***" + printf '\n*** CONVERTING "%s" ***\n' "$INPUT" OUTDIR="$BASEOUTDIR/$(basename "$INPUT")" - echo "Destination directory: \"$OUTDIR\"" - echo + printf '\nDestination directory: "%s"\n\n' "$OUTDIR" mkdir -p "$OUTDIR" pacpl \ --to mp3 --encoder lame --defopts 0 --eopts "$LAMEOPTIONS" \