Skip to content

Commit

Permalink
Enable interpretation of backslash escapes in example (#15884)
Browse files Browse the repository at this point in the history
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 2382c9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/en/docs/tasks/extend-kubectl/kubectl-plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2382c9e

Please sign in to comment.