X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command_util.sh;h=822cad2af5a74037867e95d5613c27e8eb56f2ee;hp=ad75c9b575680bc7c6310610ffece6dc358cbfd5;hb=13f8214c662144b2afa5c9fbf3cf2fbe1e9a36f0;hpb=c31f2422a6f4dd8e3041788990bd138b29b85c3a;ds=sidebyside diff --git a/command_util.sh b/command_util.sh index ad75c9b5..822cad2a 100755 --- a/command_util.sh +++ b/command_util.sh @@ -241,7 +241,7 @@ dump_array_member() echo ".description = \"$desc_txt\"," echo ".usage = \"$usage_txt\"," echo ".help = " - echo "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g' + printf "%s\n" "$help_txt" | sed -e 's/^/\"/g' -e 's/$/\\n\"/g' echo '},' } @@ -263,7 +263,7 @@ template_loop() perms_txt=$(echo $t_perms | $sed_cmd) desc_txt=$(echo $t_desc | $sed_cmd) usage_txt=$(echo $t_usage | $sed_cmd) - help_txt=$(echo $t_help | $sed_cmd) + help_txt=$(printf "%s" "$t_help" | $sed_cmd) prototype=$(echo "$template_prototype" | $sed_cmd) $1 done