From 85f7064fe0ddc2e59aad9e11efe0de4cc063c6e0 Mon Sep 17 00:00:00 2001 From: Zhou Zheng Sheng Date: Tue, 7 Jul 2015 11:08:22 +0800 Subject: [PATCH] Website: Delete the unnecessary backslash at the end shell command line Shell thinks '\' as line continuation only when it's unquoted or in double quotes. It's not necessary to manually mark '\' in single quotes, because when shell sees the a single quote starts, it continues the line automatically until it sees the matching single quote ends. Thus, echo 'a\ b' would give the following output a\ b And echo 'a b' gives the following output a b Since we don't want to leave backslashes in the resulting json files, we should remove the line continuation backslashes inside single quotes. --- website/source/intro/getting-started/checks.html.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website/source/intro/getting-started/checks.html.markdown b/website/source/intro/getting-started/checks.html.markdown index 8a6af86f54..f4e6ec4a7e 100644 --- a/website/source/intro/getting-started/checks.html.markdown +++ b/website/source/intro/getting-started/checks.html.markdown @@ -30,11 +30,11 @@ Create two definition files in the Consul configuration directory of the second node: ```text -vagrant@n2:~$ echo '{"check": {"name": "ping", \ +vagrant@n2:~$ echo '{"check": {"name": "ping", "script": "ping -c1 google.com >/dev/null", "interval": "30s"}}' \ >/etc/consul.d/ping.json -vagrant@n2:~$ echo '{"service": {"name": "web", "tags": ["rails"], "port": 80,\ +vagrant@n2:~$ echo '{"service": {"name": "web", "tags": ["rails"], "port": 80, "check": {"script": "curl localhost >/dev/null 2>&1", "interval": "10s"}}}' \ >/etc/consul.d/web.json ```