Delete original wav file if lame was successful encoding.

In a bash script:

src=�cooltrack.wav�
dst=�cooltrack.mp3�

lame $src $dst

I would like to add some line that would delete the source wav file like:

rm $src

but I would like this only if the encoding was successful.
What should I include before deleting the original to check that the encoding with lame went alright?

u can try this:

lame $src $dst && rm -frv $src || echo "$src encoding failed"

when lame $src $dst return zero if lame encoding sucess.

Many thanks to you, yunccll.