3

it's already known that

lame --scale N song.mp3 loud_song.mp3

where N is the scale number.

well, I want to apply in every mp3 file in a folder, and preserve the name of files.

mao2047
  • 91
  • 1
  • 8

1 Answers1

3
tmpfile=~/.deleteme.mp3
MyExit() { rm -f "$tmpfile"; }
trap MyExit EXIT

for f in *.mp3
do
    lame --scale 2 "$f" "$tmpfile" && mv "$tmpfile" "$f"
done
John1024
  • 109,961
  • 14
  • 137
  • 171