From 86ae9bb68973165682b7ee23743ab6c790cefbc2 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Tue, 23 Apr 2019 17:12:13 -0400 Subject: ob_parse_control(): Replace param prefix/suffix removals with read --- (limited to 'src') diff --git a/src/control.sh b/src/control.sh index 45600a6..2a7634d 100644 --- a/src/control.sh +++ b/src/control.sh @@ -100,11 +100,10 @@ parse_control() return 0 fi fi - name="${line%%:*}" - value="${line#*:}" - value="${value# }" - if [ "x${name}" = 'x' -o "x${name}" = \ - "x${line}" ]; then + IFS=': ' read name value <<-EOF + ${line} + EOF + if [ "x${name}" = 'x' ]; then _parse_control_error "${file}" \ "${line_nr}" 'control_bad_nv' continue -- cgit v0.9.1