Enable interpretation of backslash escapes in example (#15884)

Interpretation of backslash escapes should be enabled when echoing
newlines to a script, otherwise the example plugin is not runable.
pull/15936/head
Quan Tian 2019-08-19 08:54:03 +08:00 committed by Kubernetes Prow Robot
parent 58796bcff6
commit 2382c9ea4e
1 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ Example:
```bash
# create a plugin
echo '#!/bin/bash\n\necho "My first command-line argument was $1"' > kubectl-foo-bar-baz
echo -e '#!/bin/bash\n\necho "My first command-line argument was $1"' > kubectl-foo-bar-baz
sudo chmod +x ./kubectl-foo-bar-baz
# "install" our plugin by placing it on our PATH
@ -185,7 +185,7 @@ Example:
```bash
# create a plugin containing an underscore in its filename
echo '#!/bin/bash\n\necho "I am a plugin with a dash in my name"' > ./kubectl-foo_bar
echo -e '#!/bin/bash\n\necho "I am a plugin with a dash in my name"' > ./kubectl-foo_bar
sudo chmod +x ./kubectl-foo_bar
# move the plugin into your PATH