diff options
| author | Paul Buetow <paul@buetow.org> | 2021-11-07 13:45:25 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-11-07 13:45:25 +0200 |
| commit | bbaf2d95f75002045e49b89f7abb6ad04e2a096a (patch) | |
| tree | ef1af57f9b1f6ad436829a23bd2cddd9989105a0 /doc/examples.md | |
| parent | cff54875e836a5da0fd3521bea23817f2b40ec54 (diff) | |
update dgrep.gif example
Diffstat (limited to 'doc/examples.md')
| -rw-r--r-- | doc/examples.md | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/doc/examples.md b/doc/examples.md index 4a08321..1fb4f41 100644 --- a/doc/examples.md +++ b/doc/examples.md @@ -74,22 +74,17 @@ Hint: You can also use the shorthand version: # How to use ``dgrep`` -The following example demonstrates how to grep files (display only the lines which match a given regular expression) of multiple servers at once. In this example, we look after the swap partition in ``/etc/fstab``. We do that only on the first 20 servers from ``serverlist.txt``. ``dgrep`` is also very useful for searching log files of the past. +The following example demonstrates how to grep files (display only the lines which match a given regular expression) of multiple servers at once. In this example, we look after some entries in ``/etc/passwd``. This time, we don't provide the server list via an file but rather via a comma separated list directly on the command line. We also explore the `-before`, `-after` and `-max` flags. ```shell -% dgrep --servers <(head -n 20 serverlist.txt) \ - --files /etc/fstab \ - --regex swap +% dgrep --servers server1.example.org:2223 \ + --files /etc/passwd \ + --regex nologin ```  -You can also use the shorthand version: - -```shell -% dgrep --servers <(head -n 20 serverlist.txt) \ - /etc/fstab swap -``` +Hint: `-regex` is an alias for `-grep`. # How to use ``dmap`` |
