#include <hallo.h> * Dan Jacobson [Wed, Aug 09 2006, 07:46:03PM]: > Package: cdda2wav > Version: 4:2.01+01a03-5 > Severity: normal > File: /usr/bin/cdda2mp3 > > Doing like the man pages says, > $ cdda2mp3 > /usr/bin/cdda2mp3: line 49: -t1: command not found
Weird, and not explainable. Which shell are using, ie. what does /bin/sh point to? BTW: current script versions are completely broken. I attach recent update to this mail, please try with them and report the result. If it does not work, execute it with "bash -x" and send the STDERR output please. Eduard.
#! /bin/sh # Demo script for processing all audio tracks with a mp3 decoder # based on a news article by Tom Kludy # This variant uses named pipes in order to save space. # There is another variant of this script, which uses temporary # wav files (see cdda2mp3.new). # # usage: cdda2ogg <name prefix for all ogg files> # # list_audio_tracks is a (symbolic) link to cdda2wav # and used to generate a list of audio track numbers and start # sectors, which in turn are used in a loop to spawn cdda2wav # and the post processor on a track by track basis. # specify the sampling program and its options # do not specify the track option here! CDDA2WAV=${CDDA2WAV:-cdda2wav} CDDA2WAV_OPTS=${CDDA2WAV_OPTS:-'-H -P0 -q'} # for normal use, comment out the next line #DEBUG='-d1' # the post processor is fed through a pipe to avoid space waste # specify the post processing program and its options MP_CODER=${MP_CODER:-oggenc} MP_OPTIONS=${MP_OPTIONS:-''} export MP_CODER MP_CODER=$(which $MP_CODER 2>/dev/null) if [ ! -x "$MP_CODER" ] ; then echo "Encoder not found. Install one first!" exit 1 fi CDDA_DEVICE=${CDDA_DEVICE:-/dev/cdrw} export CDDA_DEVICE FILEPREFIX=${1:-audiotrack} if [ -e /etc/default/cdda2ogg ]; then . /etc/default/cdda2ogg fi LIST="$($CDDA2WAV -v trackid -t -1 2>&1|grep T:|cut -f1 -d.|cut -f2 -d:)" if [ -z "$LIST" ] ; then echo "ERROR: No audio tracks detected" exit 1 else echo Found `echo $LIST | wc -w` tracks in $CDDA_DEVICE, encoding with $MP_CODER. echo Cancel with Ctrl-C, watch out for error messages. fi for TRACK in $LIST ; do echo Start ripping Track Nr. $TRACK NAME=`printf "%02d" $TRACK`-$FILEPREFIX.ogg $CDDA2WAV $CDDA2WAV_OPTS -t$TRACK $DEBUG - | \ $MP_CODER $MP_OPTIONS - > $NAME # check result code RES=$? if [ $RES != 0 ] ; then echo File $NAME failed \(result $RES\). Aborted. >&2 break fi TRACK=`echo $(($TRACK+1))` done
#! /bin/sh # Demo script for processing all audio tracks with a mp3 decoder # based on a news article by Tom Kludy # This variant uses named pipes in order to save space. # There is another variant of this script, which uses temporary # wav files (see cdda2mp3.new). # # usage: cdda2mp3 <name prefix for all mp3 files> # # list_audio_tracks is a (symbolic) link to cdda2wav # and used to generate a list of audio track numbers and start # sectors, which in turn are used in a loop to spawn cdda2wav # and the post processor on a track by track basis. # specify the sampling program and its options # do not specify the track option here! CDDA2WAV=${CDDA2WAV:-cdda2wav} CDDA2WAV_OPTS=${CDDA2WAV_OPTS:-'-H -P0 -q'} # for normal use, comment out the next line #DEBUG='-d1' # the post processor is fed through a pipe to avoid space waste # specify the post processing program and its options MP_CODER=${MP_CODER:-lame} MP_OPTIONS=${MP_OPTIONS:-''} export MP_CODER MP_CODER=$(which $MP_CODER 2>/dev/null) if [ ! -x "$MP_CODER" ] ; then echo "Encoder not found. Install one first!" exit 1 fi CDDA_DEVICE=${CDDA_DEVICE:-/dev/cdrw} FILEPREFIX=${1:-audiotrack} if [ -e /etc/default/cdda2mp3 ]; then . /etc/default/cdda2mp3 fi LIST="$($CDDA2WAV -v trackid -t -1 2>&1|grep T:|cut -f1 -d.|cut -f2 -d:)" if [ -z "$LIST" ] ; then echo "ERROR: No audio tracks detected" exit 1 else echo Found `echo $LIST | wc -w` tracks in $CDDA_DEVICE, encoding with $MP_CODER. echo Cancel with Ctrl-C, watch out for error messages. fi for TRACK in $LIST ; do echo Start ripping Track Nr. $TRACK $CDDA2WAV $CDDA2WAV_OPTS -t$TRACK $DEBUG - | \ # echo n | $MP_CODER $NPIPE $FILEPREFIX$TRACK.mp3 $MP_OPTIONS $MP_CODER $MP_OPTIONS - $FILEPREFIX$TRACK.mp3 # check result code RES=$? if [ $RES != 0 ] ; then echo File $NAME failed \(result $RES\). Aborted. >&2 break fi done