File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -74,12 +74,16 @@ if [ $# -gt 0 ]; then
74
74
else
75
75
cmd+=(bash -l)
76
76
fi
77
- # translate embedded single-quotes to double-quotes, so the following line will work
78
- cmd=( " ${cmd[@]// \' / \" } " )
77
+
78
+ # translate embedded single-quotes to double-quotes, and double backslashes,
79
+ # so the following jsonify (sed) line will work
80
+ cmd=( " ${cmd[@]// \' / \" } " )
81
+ cmd=( " ${cmd[@]// \\ / \\\\ / } " )
79
82
80
83
# jsonify(as an array) the argument list (mainly from the command line)
81
- entrypoint=" $( echo " ['${cmd[@]/%/ \' , \' } ']" | sed -e " s/' /'/g" \
82
- -e " s/, '']\$ /]/" -Ee " s/([\"\\ ])/\\\\ \1/g" -e ' s/\\\\n/\\n/g' | tr \' \" ) "
84
+
85
+ entrypoint=" $( echo -e " ['${cmd[@]/%/ \' , \' } ']" | sed -e " s/' /'/g" \
86
+ -e " s/, '']\$ /]/" -Ee ' s/(["\\])/\\\1/g' -e ' s/\\\\n/\\n/g' | tr \' \" ) "
83
87
84
88
if [ -z " $node " ]; then
85
89
echo " Please specify node name"
You can’t perform that action at this time.
0 commit comments