Replace tail -n +5
with appropriate sed
`sed '1,/^$/d'` skips everything until the first empty line.
This commit is contained in:
parent
551ef0434f
commit
861a7e02b6
1 changed files with 2 additions and 2 deletions
|
@ -154,8 +154,8 @@ Dockviz also supports receiving Docker image or container json data on standard
|
|||
```
|
||||
$ curl -s http://localhost:4243/images/json?all=1 | dockviz images --tree
|
||||
$ curl -s http://localhost:4243/containers/json?all=1 | dockviz containers --dot | dot -Tpng -o containers.png
|
||||
$ echo -e "GET /images/json?all=1 HTTP/1.0\r\n" | nc -U /var/run/docker.sock | tail -n +5 | dockviz images --tree
|
||||
$ echo -e "GET /containers/json?all=1 HTTP/1.0\r\n" | nc -U /var/run/docker.sock | tail -n +5 | dockviz containers --dot | dot -Tpng -o containers.png
|
||||
$ echo -e "GET /images/json?all=1 HTTP/1.0\r\n" | nc -U /var/run/docker.sock | sed '1,/^$/d' | dockviz images --tree
|
||||
$ echo -e "GET /containers/json?all=1 HTTP/1.0\r\n" | nc -U /var/run/docker.sock | sed '1,/^$/d' | dockviz containers --dot | dot -Tpng -o containers.png
|
||||
```
|
||||
|
||||
Note: GNU netcat doesn't support `-U` (UNIX socket) flag, so OpenBSD variant can be used.
|
||||
|
|
Loading…
Reference in a new issue