summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-09-01 14:41:51 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-09-01 14:41:51 (EDT)
commitb7b01105b637cf77248b61d70c036268e2f6f572 (patch)
tree7649dce8f375f4eb9c1040337decfe485ea0fa0c
parent50a489ad2804b853bc429b1eb0757d5c4e921943 (diff)
substvars: Use printf instead of echo
-rw-r--r--lib/substvars.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/substvars.sh b/lib/substvars.sh
index 457fb9f..55bbee9 100644
--- a/lib/substvars.sh
+++ b/lib/substvars.sh
@@ -93,7 +93,7 @@ substvars()
old_rhs="${rhs}"
# Perform the substitution.
- name="$(echo "${name}" | tr 'A-Z-' 'a-z_')"
+ name="$(printf '%s\n' "${name}" | tr 'A-Z-' 'a-z_')"
value="$(eval printf '%s\n' "\"\${substvar_${name}}\"")"
string="${lhs}${value}${rhs}"
depth=$(($depth + 1))