]> git.plutz.net Git - confetti/commitdiff
fix faulty escaping of line breaks
authorpaul <paul@plutz.net>
Mon, 14 Nov 2016 17:01:42 +0000 (17:01 +0000)
committerpaul <paul@plutz.net>
Mon, 14 Nov 2016 17:01:42 +0000 (17:01 +0000)
svn path=/trunk/; revision=146

actions/update_card.sh

index c2a4a7193654eaaf3ede4d8e2d99a703aa2fae1e..a1143c3d72057359ef7b42a07c919c3d21ef33f4 100755 (executable)
@@ -31,7 +31,7 @@ attfile="$_DATA/mappings/attendance"
 vcf_escape(){
   for each in "$@"; do
     printf %s\\n "$each" \
-    | sed -r ':X;$!{N;bX}; s;\r\n;\n;g; s;([\n\;,\\]);\\\1;g;'
+    | sed -r ':X;$!{N;bX}; s;\r\n;\n;g; s;([;,\\]);\\\1;g; s;\n;\\n;g;'
   done \
   | sed -r ':X;$!{N;bX}; s;\n;\;;g'
 }