Browse Source

mp3car: use printf instead of echo

master
Matteo Cypriani 1 year ago
parent
commit
d06558144b
1 changed files with 3 additions and 5 deletions
  1. 3
    5
      audio/mp3car.sh

+ 3
- 5
audio/mp3car.sh View File

@@ -15,7 +15,7 @@
15 15
 # Dependencies: pacpl, lame
16 16
 
17 17
 if [ $# -lt 1 ] ; then
18
-  echo "Usage: $0 <input> [input [...]]"
18
+  printf 'Usage: %s <input> [input [...]]\n' "$0" >&2
19 19
   exit 1
20 20
 fi
21 21
 
@@ -23,11 +23,9 @@ BASEOUTDIR="$HOME/tmp/mp3car"
23 23
 LAMEOPTIONS="-v -b 32 -B 128"
24 24
 
25 25
 for INPUT in "$@" ; do
26
-  echo
27
-  echo "*** CONVERTING \"$INPUT\" ***"
26
+  printf '\n*** CONVERTING "%s" ***\n' "$INPUT"
28 27
   OUTDIR="$BASEOUTDIR/$(basename "$INPUT")"
29
-  echo "Destination directory: \"$OUTDIR\""
30
-  echo
28
+  printf '\nDestination directory: "%s"\n\n' "$OUTDIR"
31 29
   mkdir -p "$OUTDIR"
32 30
   pacpl \
33 31
     --to mp3 --encoder lame --defopts 0 --eopts "$LAMEOPTIONS" \

Loading…
Cancel
Save