rename md5 file for its porpuse (and in EN)

This commit is contained in:
6543 2019-09-11 03:38:55 +02:00
parent d27ceda314
commit 3cdd417694
Signed by: 6543
GPG Key ID: A1CA74D27FD13271
2 changed files with 5 additions and 6 deletions

View File

@ -1,6 +1,5 @@
cp source.md5 2cp.md5 cp source.md5 2cp.md5


cp aim.md5 vorhanden
cp source_rm.md5 2rm.md5 cp source_rm.md5 2rm.md5


-> ./select -> ./select

10
select
View File

@ -2,26 +2,26 @@
#wenn delete file exits -> handle deletons (importand for konflict handling #wenn delete file exits -> handle deletons (importand for konflict handling
[ -f 2rm.md5 ] && { [ -f 2rm.md5 ] && {
cat 2rm.md5 | cut -c -32 | while read line; do cat 2rm.md5 | cut -c -32 | while read line; do
sed -i "/$line/d" vorhanden sed -i "/$line/d" aim.md5
done done
cat 2rm.md5 | cut -c 35- | while read line; do cat 2rm.md5 | cut -c 35- | while read line; do
l=$(grep " $line"$ vorhanden) l=$(grep " $line"$ aim.md5)
[ -n "$l" ] && { [ -n "$l" ] && {
echo $l echo $l
md5=$(echo $l | cut -c -32) md5=$(echo $l | cut -c -32)
sed -i "/$md5/d" vorhanden sed -i "/$md5/d" aim.md5
} }
done done
rm 2rm.md5 rm 2rm.md5
} }


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


#dateien die verschiedenen md5 haben aber bei beiden existieren als konflikte behandeln #dateien die verschiedenen md5 haben aber bei beiden existieren als konflikte behandeln
echo Konflicts: echo Konflicts:
echo echo
cat vorhanden | cut -c 35- | while read line; do cat aim.md5 | cut -c 35- | while read line; do
l=$(grep " $line"$ 2cp.md5 | tee -a konflicts) l=$(grep " $line"$ 2cp.md5 | tee -a konflicts)
[ -n "$l" ] && { [ -n "$l" ] && {
echo $l echo $l