handle deletions

This commit is contained in:
6543 2019-03-19 17:17:49 +01:00
parent 5ccc83e0d7
commit 50b7d19b6b

13
select
View File

@ -1,4 +1,17 @@
#!/bin/bash #!/bin/bash
#wenn delete file exits
[ -f RM ] && {
cat RM | cut -c -32 | while read line; do sed -i "/$line/d" vorhanden ; done
cat RM | cut -c 35- | while read line; do
l=$(grep " $line"$ vorhanden)
[ -n "$l" ] && {
echo $l
md5=$(echo $l | cut -c -32)
sed -i "/$md5/d" vorhanden
}
done
}

#gleiche dateien anhand md5 aussortieren #gleiche dateien anhand md5 aussortieren
cat vorhanden | cut -c -32 | while read line; do sed -i "/$line/d" 2cp ; done cat vorhanden | cut -c -32 | while read line; do sed -i "/$line/d" 2cp ; done