use tee with append
This commit is contained in:
parent
389312ed8c
commit
a02f8f2d7a
6
cp_sh
6
cp_sh
@ -42,16 +42,16 @@ cat "$md5_tmp" | while read line; do
|
|||||||
echo "$file_md5 $file_aim" >> "${md5}.sucess-log"
|
echo "$file_md5 $file_aim" >> "${md5}.sucess-log"
|
||||||
sed -i "/$file_md5/d" "$md5"
|
sed -i "/$file_md5/d" "$md5"
|
||||||
else
|
else
|
||||||
echo "Error: Hash mismatch: \"NEW:${file_md5_new} OLD:${file_md5}\" $file_aim" | tee "${md5}.error-log"
|
echo "Error: Hash mismatch: \"NEW:${file_md5_new} OLD:${file_md5}\" $file_aim" | tee -a "${md5}.error-log"
|
||||||
sed -i "/$file_md5/d" "$md5"
|
sed -i "/$file_md5/d" "$md5"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "To Big: $file_md5 $file_orig" | tee "${md5}.error-log"
|
echo "To Big: $file_md5 $file_orig" | tee -a "${md5}.error-log"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "Error: Not Exist: $file_orig" | tee "${md5}.error-log"
|
echo "Error: Not Exist: $file_orig" | tee -a "${md5}.error-log"
|
||||||
sed -i "/$file_md5/d" "$md5"
|
sed -i "/$file_md5/d" "$md5"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user