filter

cmd/filter

Search file content (grep-like)

Quick Start

filter <pattern> [file...] [options]

At A Glance

Name
filter
Help Source
flag.Usage via -h
Doc Source
package comments
Flags
11
Subcommands
0

Usage

  • filter <pattern> [file...] [options]

Subcommands

No subcommands.

Flags

FlagTypeDescription
-after int Show N lines after match
-before int Show N lines before match
-context int Show N lines before and after match
-count - Only show match count per file
-files-only - Only show filenames with matches
-fixed - Treat pattern as fixed string, not regex
-ignore-case - Case-insensitive search
-invert - Invert match (show non-matching lines)
-line-number - Show line numbers
-quiet - Quiet mode (exit 0 if match found)
-recursive - Search directories recursively

Exit Codes

CodeMeaning
0 Success
1 Runtime/command error
2 Invalid flags/usage