Change "--output" to "-o" in curl examples.

This commit is contained in:
Pēteris Caune 2020-06-15 16:14:03 +03:00
parent bd3f150284
commit a3b58d25ff
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
4 changed files with 19 additions and 17 deletions

View File

@ -42,7 +42,7 @@ increasingly important as you add more checks to your account.</p>
after the command:</p>
<div class="highlight"><pre><span></span><code>$ crontab -e
<span class="c1"># m h dom mon dow command</span>
<span class="m">8</span> <span class="m">6</span> * * * /home/user/backup.sh <span class="o">&amp;&amp;</span> curl -fsS --retry <span class="m">3</span> --output /dev/null PING_URL
<span class="m">8</span> <span class="m">6</span> * * * /home/user/backup.sh <span class="o">&amp;&amp;</span> curl -fsS --retry <span class="m">3</span> -o /dev/null PING_URL
</code></pre></div>
@ -73,11 +73,12 @@ there is an error. Feel free to adjust the curl options to suit your needs.</p>
</tr>
<tr>
<th>-s, --silent</th>
<td>Silent or quiet mode. Don't show progress meter or error messages.</td>
<td>Silent or quiet mode. Use it to hide progress meter,
but it also hides error messages.</td>
</tr>
<tr>
<th>-S, --show-error</th>
<td>When used with -s it makes curl show error message if it fails.</td>
<td>Re-enables error messages when -s is used.</td>
</tr>
<tr>
<th>--retry &lt;num&gt;</th>
@ -85,14 +86,14 @@ there is an error. Feel free to adjust the curl options to suit your needs.</p>
If a transient error is returned when curl tries to perform a
transfer, it will retry this number of times before giving up.
Setting the number to 0 makes curl do no retries
(which is the default). Transient error means either: a timeout,
an FTP 4xx response code or an HTTP 5xx response code.
(which is the default). Transient error is a timeout or an HTTP 5xx
response code.
</td>
</tr>
<tr>
<th>&gt; /dev/null</th>
<th>-o /dev/null</th>
<td>
Redirect curl's stdout to /dev/null (error messages go to stderr,)
Redirect curl's stdout to /dev/null (error messages still go to stderr)
</td>
</tr>
</table>
@ -109,4 +110,4 @@ there is an error. Feel free to adjust the curl options to suit your needs.</p>
</span>System clock synchronized: yes
NTP service: active
RTC in local TZ: no
</code></pre></div>
</code></pre></div>

View File

@ -41,7 +41,7 @@ after the command:
```bash
$ crontab -e
# m h dom mon dow command
8 6 * * * /home/user/backup.sh && curl -fsS --retry 3 --output /dev/null PING_URL
8 6 * * * /home/user/backup.sh && curl -fsS --retry 3 -o /dev/null PING_URL
```
Now, each time your cron job runs, it will send a HTTP request to the ping URL.
@ -74,11 +74,12 @@ there is an error. Feel free to adjust the curl options to suit your needs.
</tr>
<tr>
<th>-s, --silent</th>
<td>Silent or quiet mode. Don't show progress meter or error messages.</td>
<td>Silent or quiet mode. Use it to hide progress meter,
but it also hides error messages.</td>
</tr>
<tr>
<th>-S, --show-error</th>
<td>When used with -s it makes curl show error message if it fails.</td>
<td>Re-enables error messages when -s is used.</td>
</tr>
<tr>
<th>--retry &lt;num&gt;</th>
@ -86,14 +87,14 @@ there is an error. Feel free to adjust the curl options to suit your needs.
If a transient error is returned when curl tries to perform a
transfer, it will retry this number of times before giving up.
Setting the number to 0 makes curl do no retries
(which is the default). Transient error means either: a timeout,
an FTP 4xx response code or an HTTP 5xx response code.
(which is the default). Transient error is a timeout or an HTTP 5xx
response code.
</td>
</tr>
<tr>
<th>&gt; /dev/null</th>
<th>-o /dev/null</th>
<td>
Redirect curl's stdout to /dev/null (error messages go to stderr,)
Redirect curl's stdout to /dev/null (error messages still go to stderr)
</td>
</tr>
</table>

View File

@ -1,3 +1,3 @@
<div class="highlight"><pre><span></span><span class="c1"># m h dom mon dow command</span>
<span class="m">8</span> <span class="m">6</span> * * * /home/user/backup.sh <span class="o">&amp;&amp;</span> curl -fsS --retry <span class="m">3</span> --output /dev/null {{ ping_url }}
<span class="m">8</span> <span class="m">6</span> * * * /home/user/backup.sh <span class="o">&amp;&amp;</span> curl -fsS --retry <span class="m">3</span> -o /dev/null {{ ping_url }}
</pre></div>

View File

@ -1,2 +1,2 @@
# m h dom mon dow command
8 6 * * * /home/user/backup.sh && curl -fsS --retry 3 --output /dev/null PING_URL
8 6 * * * /home/user/backup.sh && curl -fsS --retry 3 -o /dev/null PING_URL