first commit
[scripts.git] / extract
blob9e46d6409d2ab9cbb4d790fd4e92f8c0a091c12a
1 #!/bin/bash
3 echo "Is there a password?(y/n)"
4 read ANS
6 if [ $ANS = 'n' ]; then
7 for i in *part1.rar.*; do
8 unrar e "$i"
9 done
11 for i in *.part01.rar.*; do
12 unrar e "$i"
13 done
15 elif [ $ANS = 'y' ]; then
16 echo "Please enter the password!"
17 read PASS
19 for i in *part1.rar.*; do
20 unrar e -p"$PASS" "$i"
21 done
23 for i in *part01.rar.*; do
24 unrar e -p"$PASS" "$i"
25 done
27 else
28 echo "Error! Please answer y or n!"