From d8764de4233047024d4276d5beb3062a23eec10f Mon Sep 17 00:00:00 2001 From: Gabriel Nicolas Avellaneda Date: Fri, 5 Apr 2019 14:06:00 -0300 Subject: [PATCH] Proper use of quotes for running the command $1 on a shell has a special meaning and inside of double quotes (") it will be expaned to an empty string. Using single quotes fixes the issue. --- docs/examples/rewrite/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/examples/rewrite/README.md b/docs/examples/rewrite/README.md index 75d94b7bb..5043dab14 100644 --- a/docs/examples/rewrite/README.md +++ b/docs/examples/rewrite/README.md @@ -33,7 +33,7 @@ Rewriting can be controlled using the following annotations: Create an Ingress rule with a rewrite annotation: ```console -$ echo " +$ echo ' apiVersion: extensions/v1beta1 kind: Ingress metadata: @@ -50,7 +50,7 @@ spec: serviceName: http-svc servicePort: 80 path: /something/?(.*) -" | kubectl create -f - +' | kubectl create -f - ``` In this ingress definition, any characters captured by `(.*)` will be assigned to the placeholder `$1`, which is then used as a parameter in the `rewrite-target` annotation.