From 2382c9ea4e9f76b547fc1e70b2b249df4b7c3d30 Mon Sep 17 00:00:00 2001 From: Quan Tian Date: Mon, 19 Aug 2019 08:54:03 +0800 Subject: [PATCH] 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. --- content/en/docs/tasks/extend-kubectl/kubectl-plugins.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/docs/tasks/extend-kubectl/kubectl-plugins.md b/content/en/docs/tasks/extend-kubectl/kubectl-plugins.md index a78bab5360..edc1d812eb 100644 --- a/content/en/docs/tasks/extend-kubectl/kubectl-plugins.md +++ b/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