unless you can convert direct from losless compression to whatever lossy compression format #!/bin/sh echo Converting $1 echo to $2... flac -c -d "$1" | lame --nohist --vbr-new -h -k - "$2" id3cp "$1" "$2"