Skip to content
This repository has been archived by the owner on May 4, 2023. It is now read-only.

Commit

Permalink
Add example command using dig lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
rduplain committed Oct 25, 2019
1 parent 9a72112 commit 7c4912b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ Build a hosts (/etc/hosts) file from multiple sources.
-v, --version Output version, then exit.
```

Example command to write the IPv4 address of `example.net` as `server`:

```sh
hosts -f /etc/hosts -s "$(dig example.net A +short | grep '^[.0-9]*$') server"
```

Redirect stdout to write to a file. Example:

```
Expand Down

0 comments on commit 7c4912b

Please sign in to comment.