[mythtv-users] Removing commercials

Harry Devine lifter89 at comcast.net
Sun Nov 4 02:37:10 UTC 2007

Randall Hopper wrote:
> Harry Devine:
>  |I checked my mythbackend.log, and got the following:
>  |          "sh: /usr/local/bin/removecommercials: /bin/sh^M: bad 
>  |interpreter: No such file or directory"
> ...
>  |Any ideas?
> Run this:
>   od -x /usr/local/bin/removecommercials | grep 0d
> If this finds any "0d" (carriage return characters), you edited this file
> with a DOS/Windows text editor.  Run your favorite dos2unix tool on it, or
> if you don't have one, this'll do:
>   tr -d "\015" < /usr/local/bin/removecommercials > /tmp/junk
>   mv /tmp/junk /usr/local/bin/removecommercials
>   chmod a+x /usr/local/bin/removecommercials
> Randall
I just tried this and it appears to have worked.  I had copied the 
original over to a temporary name.  I did the tr command as you 
suggested, then I ran the removecommercials script to test it.  I got 
the usage printout, so that's a good sign.  Running the renamed, 
original version gave me the original problem, so the file being in DOS 
format seems to be what the trouble was.

Thanks to all of you who helped out on this.

More information about the mythtv-users mailing list