Skip to content
Permalink
Browse files

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.
  • Loading branch information...
tnqn authored and k8s-ci-robot committed Aug 19, 2019
1 parent 58796bc commit 2382c9ea4e9f76b547fc1e70b2b249df4b7c3d30
Showing with 2 additions and 2 deletions.
  1. +2 −2 content/en/docs/tasks/extend-kubectl/kubectl-plugins.md
@@ -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

0 comments on commit 2382c9e

Please sign in to comment.
You can’t perform that action at this time.