auto commit
[opensuse:package-lists.git] / split_dvd9.sh
1 #!/bin/bash
2 # usage:
3 # ./split_dvd9 list1 list2 dest1 dest2 dest3
4
5 list1=$1
6 list2=$2
7 dest1=$3
8 dest2=$4
9 dest3=$5
10
11 export LC_ALL=C 
12
13 cat $list1 $list2 | sort | uniq -d > $dest1
14
15 : > $dest2
16 : > $dest3
17
18 for i in `cat $list1 $list2 | sort | uniq -u`;
19 do
20   if grep -q -x "$i" $list1; then
21      echo $i >> $dest2
22   else
23      echo $i >> $dest3
24   fi
25 done
26