]> git.plutz.net Git - confetti/blobdiff - pdiread.sh
portability fix
[confetti] / pdiread.sh
index 8118318d3d4bdd4e2793d468c037b28b5006588f..6f15658dc912c72a187c1559328e1e77a763b741 100755 (executable)
@@ -32,7 +32,7 @@ pdi_load() {
   # Usage example:
   # data="$(pdi_load file.vcf)"
 
-  sed -En '
+  sed -srn '
     # === Read entire file into buffer ===
     :X $bY; N; bX; :Y s;^.*$;\n&\n;;
 
@@ -100,7 +100,7 @@ pdi_load() {
     # === Update obsolete LABEL property ===
     s;\nLABEL((\;[A-Za-z0-9-]+|\;[A-Za-z0-9-]+=([^;,:"]+|"[^"]+")(,[^;,:"]+|,"[^"]+")*)*):(.*)\n;\nADR\1\;LABEL="\5":\n;g;
 
-    p;' "$1"
+    p;' "$@"
 }
 
 pdi_count(){