Without this additional quoting, the command usage string is incorrect
in case the template contains square brackets. For example, the usage
of the lsblob commands was printed as
Usage: lspl [-i] [-l] [-r] t
rather than the desired
Usage: lspl [-i] [-l] [-r] [pattern]
because the command "echo [pattern]" prints "t" since there is a
subdirectory called "t" in the source tree.
for member in $template_members; do
local sed_cmd="sed -e s/@member@/$member/g"
#echo "sed_cmd: $sed_cmd"
- name_txt=$(echo $t_name | $sed_cmd)
+ name_txt=$(echo "$t_name" | $sed_cmd)
#name_txt="$tname"
- perms_txt=$(echo $t_perms | $sed_cmd)
- desc_txt=$(echo $t_desc | $sed_cmd)
- usage_txt=$(echo $t_usage | $sed_cmd)
+ perms_txt=$(echo "$t_perms" | $sed_cmd)
+ desc_txt=$(echo "$t_desc" | $sed_cmd)
+ usage_txt=$(echo "$t_usage" | $sed_cmd)
help_txt=$(printf "%s\n" "$t_help" | $sed_cmd)
prototype=$(echo "$template_prototype" | $sed_cmd)
$1