From 5d950c81d9073daa2478a7724459f95ccf15fb03 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Mon, 01 Sep 2014 14:49:50 -0400 Subject: set_substvar(): Use printf instead of echo --- (limited to 'lib') diff --git a/lib/substvars.sh b/lib/substvars.sh index ee7e860..5ef662b 100644 --- a/lib/substvars.sh +++ b/lib/substvars.sh @@ -29,7 +29,7 @@ set_substvar() local value="${2}" # Convert variable name to lower case and validate. - name="$(echo "${name}" | tr 'A-Z-' 'a-z_')" + name="$(printf '%s\n' "${name}" | tr 'A-Z-' 'a-z_')" case "${name:- }" in *[!a-z0-9_]*) error 2 "$(get_msg 'substvar_invalid')" "${name}" -- cgit v0.9.1