ZR v0.1

Download Description : Linux bash script to extract all rar archives that are named with part in filename in current directory.

License : Open Source (GPLv3)
Released : December 5, 2008
Filesize : 1.1 KB
Type : Bash Script
OS : Linux (any)
MD5 : c19ae1dbfc6b624cd2271fd5ba5dfcf1
Installation : 1. Open terminal
2. Change directory to where you downloaded the file.
3. Type: chmod +x ./zr.sh (this sets permission)
Usage : — Type: ./zr.sh (in folder where all rar archive files located)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
 
# zr v0.1 {12/05/2008}
# Coded by EMCGFX <www.gravityfx.org>
 
# NOTES: Extract many part1.rar, part01.rar,
# part1.rar.html and part01.rar.html files at ones.
 
echo "Extracting all [*.part1.rar] files."
for file in *.part1.rar
  do if (( `unrar l $file | tail -n 2 | grep -v ^$ | awk '{print $1}'` != 1 ))
  then unrar -y e $file ${file%\.rar}/
else
	unrar -y -c- e $file
fi
done
echo ""
 
echo "Extracting all [*.part01.rar] files."
for file in *.part01.rar
  do if (( `unrar l $file | tail -n 2 | grep -v ^$ | awk '{print $1}'` != 1 ))
  then unrar -y e $file ${file%\.rar}/
else
  unrar -y -c- e $file
fi
done
echo ""
 
echo "Extracting all [*.part1.rar.html] files."
for file in *.part1.rar.html
  do if (( `unrar l $file | tail -n 2 | grep -v ^$ | awk '{print $1}'` != 1 ))
  then unrar -y e $file ${file%\.rar}/
else
  unrar -y -c- e $file
fi
done
echo ""
 
echo "Extracting all [*.part01.rar.html] files."
for file in *.part01.rar.html
  do if (( `unrar l $file | tail -n 2 | grep -v ^$ | awk '{print $1}'` != 1 ))
  then unrar -y e $file ${file%\.rar}/
else
  unrar -y -c- e $file
fi
done
echo ""

Leave a comment

Your comment

Yandex Mail.ru Google LiveJournal myOpenId Flickr claimId Blogger Wordpress OpenID Yahoo Technorati Vidoop Verisign AOL