Skip to content

Commit

Permalink
Fix inline code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Scavo authored May 2, 2017
1 parent 385a4d8 commit fe16e29
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ A library of re-usable bash scripts

## Installation

Download the source, change directory to the source directory, and install the source into ``/tmp`` as follows:
Download the source, change directory to the source directory, and install the source into `/tmp` as follows:

```Shell
$ export BIN_DIR=/tmp/bin
Expand Down Expand Up @@ -41,17 +41,17 @@ saml_tools.sh

## Overview

### ``cget.sh``
### `cget.sh`

Bash script ``cget.sh`` retrieves and caches HTTP resources on disk. A previously cached resource is retrieved via HTTP Conditional GET [RFC 7232]. If the web server responds with HTTP 200 OK, the resource is cached and written to stdout. If the web server responds with 304 Not Modified, the cached resource is output instead.
Bash script `cget.sh` retrieves and caches HTTP resources on disk. A previously cached resource is retrieved via HTTP Conditional GET [RFC 7232]. If the web server responds with HTTP 200 OK, the resource is cached and written to stdout. If the web server responds with 304 Not Modified, the cached resource is output instead.

First let's configure logging. For convenience, we will log directly to the terminal:

```Shell
$ export LOG_FILE=/dev/tty
```

The system defaults to INFO logging, which corresponds to ``LOG_LEVEL=3``. We make that explicit as follows:
The system defaults to INFO logging, which corresponds to `LOG_LEVEL=3`. We make that explicit as follows:

```Shell
$ export LOG_LEVEL=3
Expand Down Expand Up @@ -89,7 +89,7 @@ Content-Length: 43765172
Content-Type: application/samlmetadata+xml
```

Assuming the resource doesn't change on the server, subsequent requests will return the cached resource. To bypass the network altogether, use the ``-C`` option:
Assuming the resource doesn't change on the server, subsequent requests will return the cached resource. To bypass the network altogether, use the `-C` option:

```Shell
$ $BIN_DIR/cget.sh -C $url1 | wc -c
Expand All @@ -98,7 +98,7 @@ $ $BIN_DIR/cget.sh -C $url1 | wc -c
43765172
```

Of course the ``-C`` option will fail if the resource is not cached:
Of course the `-C` option will fail if the resource is not cached:

```Shell
# illustrate "quiet failure mode"
Expand All @@ -109,7 +109,7 @@ $ echo $?
1
```

OTOH, the ``-F`` option forces the return of a fresh resource from the server. If the resource is cached and unchanged on the server (304), such a request will fail, however:
OTOH, the `-F` option forces the return of a fresh resource from the server. If the resource is cached and unchanged on the server (304), such a request will fail, however:

```Shell
# further illustrate "quiet failure mode"
Expand All @@ -121,7 +121,7 @@ $ echo $?
1
```

The ``-F`` option will work on the other URL, however:
The `-F` option will work on the other URL, however:

```Shell
$ $BIN_DIR/cget.sh -F $url2 > /dev/null
Expand Down

0 comments on commit fe16e29

Please sign in to comment.