Talk:Linux KDE 4 Configuration
From Sw
I had to make a 2 changes to the repair-script.
First, because I had files without an UID inside. In that case I added an "if" statement before stripping the "UID:" part and inserted the filename as new UID into the file. (I had to append and "\r" to prevent stripping of last character in the case I inserted the UID, because this would only append an "\n" at the end of line.)
if [ -z $UIDCAR ] then echo "inserting uid into file" sed "/^VERSION:/a UID:$file\r" $file > $file.new mv $file.new $file else # strip UID: and leading spaces off ...
Second, I changed the grep to only find "UID:" at the beginning of a line.
UIDCAR=$(cat $file | grep '^UID:')

