summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Southworth <john.southworth@vyatta.com>2012-04-11 13:29:52 -0700
committerJohn Southworth <john.southworth@vyatta.com>2012-06-15 09:38:21 -0700
commit4269531f3438f657afe7b99b12e9433d2e49dc4c (patch)
tree09cab7d062cc9c2ffbb130d138df87f62e1c5fc8
parent66d6a1ad4b1ed48a54af076130d3e223339dadd9 (diff)
downloadvyatta-op-4269531f3438f657afe7b99b12e9433d2e49dc4c.tar.gz
vyatta-op-4269531f3438f657afe7b99b12e9433d2e49dc4c.zip
Bugfix 8013: Fix space at end of line in command conversion
-rw-r--r--functions/interpreter/vyatta-op-run6
1 files changed, 5 insertions, 1 deletions
diff --git a/functions/interpreter/vyatta-op-run b/functions/interpreter/vyatta-op-run
index 365c9cd..da16ae4 100644
--- a/functions/interpreter/vyatta-op-run
+++ b/functions/interpreter/vyatta-op-run
@@ -134,7 +134,11 @@ _vyatta_op_conv_run_cmd ()
[[ "$word" =~ \$[0-9] ]]; then
word=$( sed -e 's/\$\([0-9]\)/\$\{args\[\1\]\}/g' <<<"$word" )
fi
- outline+="$word "
+ if [[ "$word" != '\\' ]]; then
+ outline+="$word "
+ else
+ outline+="$word"
+ fi
done
IFS=$'\n'
line=$outline