-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuniquely.sh
54 lines (38 loc) · 891 Bytes
/
uniquely.sh
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
48
49
50
51
52
53
54
#!/bin/bash
uniq not.out > arns.unique
filename="arns.unique"
#TOREMOVE
filename="not.out"
filename="xs.missing"
counter=0
while read -r line
do
counter=$((counter+1))
#if [ "$counter" -le 172146 ]
#then
# continue
#fi
#echo "Checking: ${line}"
rdfs="rdf.files"
while read -r rdffile
do
cat rdffiles.missing | grep ${rdffile} > tmp
#echo "rdffiles.missing | grep ${rdffile}"
found="$(wc -l tmp | sed -ne 's/ tmp//p')"
#break
if [ "$found" -ge 1 ]; then
break
fi
cat ${rdffile} | grep ${line} > tmp
#echo "cat ${rdffile} | grep ${line}"
found="$(wc -l tmp | sed -ne 's/ tmp//p')"
#echo "FOUND: $found"
if [ "$found" = 2 ]; then
echo ${rdffile} >> rdffiles.missing.xs
break
fi
#echo "checked: ${rdffile}"
done < "$rdfs"
#break
echo "Checked arn: ${line}..Counter:${counter}"
done < "$filename"