Remove a useless '\' and enhance a script in an example in the section 'Add entries ... (--add-host)'

Signed-off-by: Abreto FU <public@abreto.email>
(cherry picked from commit 07436dfe78)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Abreto FU 2020-02-06 20:45:58 +00:00 committed by Sebastiaan van Stijn
parent be60297514
commit 2d6231ad4d
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 1 additions and 1 deletions

View File

@ -689,7 +689,7 @@ using IPv4 or IPv6 networking in your containers. Use the following
flags for IPv4 address retrieval for a network device named `eth0`:
```bash
$ HOSTIP=`ip -4 addr show scope global dev eth0 | grep inet | awk '{print \$2}' | cut -d / -f 1`
$ HOSTIP=`ip -4 addr show scope global dev eth0 | grep inet | awk '{print $2}' | cut -d / -f 1 | sed -n 1p`
$ docker run --add-host=docker:${HOSTIP} --rm -it debian
```