There is an easy way to compress and convert wav sound file into mp3 using lame software. Of course we need to install the lame first. In slackware we might find lame in slackbuilds.org or slacky.eu. In Ubuntu just using synaptic manager.
The script is copied from a friend in the blogspot site.
http://linuxpoison.blogspot.com/2008/02/script-to-convert-wav-to-mp3.html
thanks to nikesh jauhari who made this script.
Here are the script.
$nano skript-wav-to-mp3
type these:
#!/bin/sh
# name of this script: wav2mp3.sh
# wav to mp3
for i in *.wav; do
if [ -e “$i” ]; then
file=basename “$i” .wav
lame -h -b 192 “$i” “$file.mp3”
fi
done
Save it by typing ctrl-o
Now the script will convert all wav file in the same folder into mp3 easily.