Skip to content

Commit baa7c5f

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

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

kubectl-node_shell

100755100644
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,14 @@ done
7070

7171
if [ $# -gt 0 ]; then
7272
cmd+=( "${@//
73-
/\\n}" )
73+
/\\\\n}" )
7474
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[@]//'/"}" )
7979
8080
# 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 \' \")"
8381
8482
if [ -z "$node" ]; then
8583
echo "Please specify node name"

0 commit comments

Comments
 (0)