Skip to content

Commit 8fc5e1e

Browse files
author
Joe Schaefer
committed
old-bash-support
- echo -e - requires more newline escapes
1 parent 6da560b commit 8fc5e1e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

kubectl-node_shell

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,10 @@ else
7575
cmd+=(bash -l)
7676
fi
7777
# translate embedded single-quotes to double-quotes, so the following line will work
78-
cmd=( "${cmd[@]//\'/\"}" )
78+
cmd=( "${cmd[@]//'/"}" )
79+
cmd=( "${cmd[@]//\\/\\\\/}" )
7980
8081
# 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 \' \")"
8382
8483
if [ -z "$node" ]; then
8584
echo "Please specify node name"

0 commit comments

Comments
 (0)