summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-06-30 11:58:09 +0530
committersinanmohd <sinan@firemail.cc>2023-06-30 12:25:50 +0530
commitaa4ab18ee326642e1cce408eb1b9a062e0a0960c (patch)
treeb26a91aeed9f15014bbf8296cff3671a6f4a8a86 /bin
parent76f5872f5f739217caccc98ac185d8a5d24b1a95 (diff)
vtoc: check for ',' in $name to not break the output csv file
Diffstat (limited to 'bin')
-rwxr-xr-xbin/vtoc.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/vtoc.sh b/bin/vtoc.sh
index f2be2cb..fc69122 100755
--- a/bin/vtoc.sh
+++ b/bin/vtoc.sh
@@ -35,6 +35,11 @@ strings "$vcf" | while read -r line; do
case "$line" in
'FN:'*)
name="${line##*:}"
+ case "$name" in
+ *,*)
+ name="$(printf "%s" "$name" | tr -d ',')"
+ ;;
+ esac
;;
'TEL;TYPE='*':'*)
# avoid repetitions in same vacrd entry