diff --git a/select b/select index 3d86772..819a731 100755 --- a/select +++ b/select @@ -1,4 +1,17 @@ #!/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 cat vorhanden | cut -c -32 | while read line; do sed -i "/$line/d" 2cp ; done