From 0a2a6e570a433deff318a1e3ac2f32326ac0c95f 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 8a6af86f5..f4e6ec4a7 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 ```