Download the script 'ape2mp3'. The original script has been slightly modified to be used with newer versions of the related software.
Use of the script is very simple (of course you need both the CUE file and the APE/FLAC file):
It requires several packages installed on your system. For Fedora, some packages can be found at freshrpms.net. You may first install freshrpms-release, then use 'yum' to install them.
# ape2mp3 album.cue album.ape
1. mac - Monkey's Audio Codec (MAC) utility and library
2. lame - LAME Ain't an MP3 Encoder... but it's the best of all
# yum install mac
3. shorten - Low complexity and fast waveform coder
# yum install lame
4. shntool - Multi-purpose WAVE data processing and reporting utility
# rpm -ivh shorten-3.6.0-1.2.i386.rpm
5. cuetools - Utilities to works with cue and TOC files
# rpm -ivh shntool-3.0.6-1.i386.rpm
# rpm -ivh cuetools-1.3.1-2.i386.rpm