From 97189c59ffa39d0a057c10c4921b1a66bab23a18 Mon Sep 17 00:00:00 2001 From: 6543 Date: Tue, 5 Mar 2019 21:32:31 +0100 Subject: [PATCH] impruve Konflict handling output --- select | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/select b/select index 88d8bfa..3d86772 100644 --- a/select +++ b/select @@ -3,8 +3,13 @@ cat vorhanden | cut -c -32 | while read line; do sed -i "/$line/d" 2cp ; done #dateien die verschiedenen md5 haben aber bei beiden existieren als konflikte behandeln +echo Konflicts: +echo cat vorhanden | cut -c 35- | while read line; do - l=$(grep " $line"$ 2cp | tee -a konflicts | cut -c -32) - md5=$(echo $l | cut -c -32) - sed -i "/$md5/d" 2cp + l=$(grep " $line"$ 2cp | tee -a konflicts) + [ -n "$l" ] && { + echo $l + md5=$(echo $l | cut -c -32) + sed -i "/$md5/d" 2cp + } done