Kristijan.org

I’m back!

Posted by Kristijan on Sunday, December 21st, 2008

How could I stay away? From the shear number of e-mails flooding my inbox daily for updates to my infamous blog, I couldn’t keep the fans in the dark no more!
*cough*
Back to reality…I’m not reviving my old blog, but starting a new one. I’ve been working as a systems administrator for about 4 years now, [...]

continue reading

Unrar TV show packs

Posted by Kristijan on Sunday, December 21st, 2008

We all download TV shows, there is no use denying it. I recently got pointed in the directory of a rather funny show called The Big Bang Theory. I grabbed the first episode of season 1, saw what I liked, then grabbed the entire season 1 pack.

17 episodes, each in their own folder in .rar files.
What a pain in the ass!

Instead of clicking away at each RAR file individually, I put together a little bash script to do the work for me which I’ve called unrar_all.

#!/bin/bash
#
# Script to unrar season packs of TV shows
# Put it in the directory containing all the directorys
#
# eg.
#       Big_Bang_Theory.1x01.Pilot.DVDRip_XviD-FoV/
#       Big_Bang_Theory.1x02.The_Big_Bran_Hypothesis.DVDRip_XviD-FoV/
#       Big_Bang_Theory.1x03.The_Fuzzy_Boots_Corollary.DVDRip_XviD-FoV/
#       unrar_all

find . -type d -print | while read i
        do pushd .
        cd $i
                unset partrar
                partrar=`find . -name *part01.rar`
                if [ -n "$partrar" ]; then
                unrar e *part01.rar
                mv *.avi ../
                popd
        else
                unrar e *.rar
                mv *.avi ../
                popd
        fi
done

This script requires unrar from RARLabs.

Posted in: Shell Scripting.

3 Responses to “Unrar TV show packs”

  1. mathiaswiberg.se » unrar bashscript Says:

    [...] Tack till kristijan.org [...]

  2. Watch Veronica Mars Says:

    I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.

  3. Watch Veronica Mars Says:

    I like to watch Veronica Mars episodes as well Lost. I found your blog on google and read a few of your other posts. I just added you to my Google News Reader. Keep up the good work. Look forward to reading more from you in the future.

Leave a Reply