script won't run in crontab(centos 5)
I have a sox|lame one line script that has served me well on other distros of linux but for some reason it will not work on my centos 5 PC.
script records from line in using sox then I pipe it through lame to re-encode it.
I've tried
37 17 09 3 * sox -t ossdsp -w -s -r 44100 -c 2 /dev/dsp -t raw - | lame -x -m s - ~/test`date +%b%d_%Y`.mp3
37 17 09 3 * sox -t ossdsp -w -s -r 44100 -c 2 /dev/dsp -t raw - | lame -x -m s - ~/test'date +%b%d_%Y'.mp3
the problem is with the 'date +%b%d_%Y' portion.
I get this in mail
sox -t ossdsp -w -s -r 44100 -c 2 /dev/dsp -t raw - | lame -x -m s - ~/test'date +
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
X-Cron-Env: <SHELL=/bin/sh>
X-Cron-Env: <HOME=/home/username>
X-Cron-Env: <PATH=/usr/bin:/bin>
X-Cron-Env: <LOGNAME=username>
X-Cron-Env: <USER=username>
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
both scripts fail with the same basic message.
basically I want the script to add the date/time/etc to a filename.
thanks!
|