I finally had an opportunity to try out the script and unfortunately ran into some problems. As of now, it didn't work for me but I think it's fixable.
First of all, I do not have a ~/.asoundrc file, so I had nothing to add the pcm.copy lines to. Would it be okay to create an asoundrc file with just those lines? Would my sound be okay with just those lines in asoundrc? My sound is working fine now and I don't want to do anything to mess it up. I'll create the file anyway to see what happens, but I'm listening to streaming audio right now and don't want to have to restart X.
The first time I tried to run the script (just to try it out, not to record Sunday Bach), I got this message:
./record.sh: line 8: 2008-5-10: command not found
warning: commands will be executed using /bin/sh
job 1 at Sat May 10 11:45:00 2008
Can't open /var/run/atd.pid to signal atd. No atd running?
Apparently, I have to start the at daemon before I can run the script. So I did an su to root and ran /usr/sbin/atd . Then as user I modified the script for further testing at 11:45 a.m. and set 12:15 p.m. as the time for the script to run. When I ran ./record.sh this time, the message said the script would run at 12:15 p.m. on Sunday (today is Saturday). I did not put SUN in the at command line in the script, so I was surprised at this result. It seems the script thinks the current time is an hour later than it actually is. If I run a date command, the time reported is the time that shows in XFce's Clock applet on the panel. So I don't know why the script thinks the time is an hour later. That's why my test script reported the script would be run on Sunday--it thought that time had already passed because it thinks my computer's time is an hour later.
I then modified the script to conform to its assumption that the time was an hour later. This time the script ran but gave me an ogg file that wouldn't play on xmms, xine, mplayer, or Amarok. From mplayer or xine (I don't remember which) I got a message about a missing demuxer. I don't know what a demuxer is or why it would be missing, since I haven't made any related changes to the defaults for all these media players.
Most of this is over my head. What can I do to fix these things?