[GRLUG] need some script help

Michael Glaske mglaske at gmail.com
Thu Apr 18 00:39:35 EDT 2013


This should work..  beware though.. It's untested.. in BASH.

for file in `find . -name \*.mp4`; do mv $file `echo $file | sed
's/\(.*\.\)mp4/\1avi/'` ; done

If you want to test it first, replace 'mv $file' with 'echo'.


On Wed, Apr 17, 2013 at 10:39 PM, Jonathan Jesse <jjesse at gmail.com> wrote:

> Hey GRLUGERS,
>
> New to scripting and all that but hoping to get some help out here.  I've
> been using minidnla on my Ubuntu laptop to stream movies to my xbox and
> things are working very well.
>
> However I notice something... If I grab something off bittorent chances
> are it is a MP4 or a MKV file and my xbox can't stream it.
>
> For some reason if I rename the same file Big Bang Theory.mp4 to Big Bang
> Theory.avi the file will play on my xbox.  Not quite sure what happens in
> the rename of the file that makes the magic work but it does.
>
> So I'm wondering if there is a script guru that could look at all my files
> that either named *.mp4 or *.mkv and rename it to whatever it was .avi?
>
> Make sense?
>
> _______________________________________________
> grlug mailing list
> grlug at grlug.org
> http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://shinobu.grlug.org/pipermail/grlug/attachments/20130418/ccd007fc/attachment-0001.html>


More information about the grlug mailing list