diff options
| author | Paul Buetow <paul@buetow.org> | 2021-10-13 21:10:28 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-10-14 20:11:23 +0300 |
| commit | 1dead22129a26e4f532e68c2c63fe4122b519506 (patch) | |
| tree | b5ab02d2400767410b8dec5183aa9f83d092f0d4 /cmd/dgrep | |
| parent | 5f3e6b8569b5b71853208949506bbcd3c44488b5 (diff) | |
Merging grep context from master
Diffstat (limited to 'cmd/dgrep')
| -rw-r--r-- | cmd/dgrep/main.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cmd/dgrep/main.go b/cmd/dgrep/main.go index da3f7a4..2d7e53b 100644 --- a/cmd/dgrep/main.go +++ b/cmd/dgrep/main.go @@ -30,6 +30,9 @@ func main() { flag.BoolVar(&displayVersion, "version", false, "Display version") flag.IntVar(&args.ConnectionsPerCPU, "cpc", config.DefaultConnectionsPerCPU, "How many connections established per CPU core concurrently") + flag.IntVar(&args.LContext.AfterContext, "after", 0, "Print lines of trailing context after matching lines") + flag.IntVar(&args.LContext.BeforeContext, "before", 0, "Print lines of leading context before matching lines") + flag.IntVar(&args.LContext.MaxCount, "max", 0, "Stop reading file after NUM matching lines") flag.IntVar(&args.SSHPort, "port", config.DefaultSSHPort, "SSH server port") flag.StringVar(&args.ConfigFile, "cfg", "", "Config file path") flag.StringVar(&args.Discovery, "discovery", "", "Server discovery method") |
