#!/bin/sh
CD_INFO="/tmp/audio_cd"

LAME_TRNUM=`ps x |grep "/lame " | grep "preset" | sed 's/.*--tn/t/' | cut -f 2 -d " "`
if [ "$LAME_TRNUM" = "" ] ; then
   CDDA_TRNUM=`ps x |grep "/cdda2wav " | grep "D<" | sed 's/.*-t/t/' | cut -f 2 -d " "`
   if [ "$CDDA_TRNUM" != "" ] ; then
      echo "Titel $CDDA_TRNUM von $CD_TRACKS wird gelesen"
   else
      echo "Umwandlung beendet"
   fi
else
   echo "Titel $LAME_TRNUM von $CD_TRACKS wird umgewandelt"
fi
if [ -s $CD_INFO ] ; then
   echo ""
   cat $CD_INFO
fi
