X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command_util.sh;h=f0a861d61d887b5e68b9e90e9b9cfa512c23b9b6;hp=ad75c9b575680bc7c6310610ffece6dc358cbfd5;hb=3913d265cd6c3b8e43bac4f1f0deb1e96bc95a15;hpb=c31f2422a6f4dd8e3041788990bd138b29b85c3a diff --git a/command_util.sh b/command_util.sh index ad75c9b5..f0a861d6 100755 --- a/command_util.sh +++ b/command_util.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash read_header() @@ -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