[mythtv-users] make a copy of .nuv as .mpg

Doug Larrick doug at ties.org
Sat Oct 16 17:57:54 UTC 2004

Matt Hannan wrote:
> cp /storage/TV/recording/*.nuv /storage/Videos/*.mpg
> cp: `/storage/Videos/*.mpg': specified destination directory does not exist

The problem is that the shell does not do substitution of the first * 
for the second.  You need to be a little more explicit:

If you are using Bash (or another sh variant):

for file in /storage/TV/recording/*.nuv; do
   export base=`basename $file .nuv`
   cp /storage/TV/recording/${base}.nuv /storage/Videos/${base}.mpg
   unset base

I have not tested this, so it may need tweaking.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://mythtv.org/pipermail/mythtv-users/attachments/20041016/f479f22d/signature.pgp

More information about the mythtv-users mailing list