Utilities
Keep lines that contain a fixed marker
Filter file or folder lines by a fixed string.
overview
What fgrep-by-string does
fgrep-by-string sits between noisy recon stages and downstream probes. Feed a file or folder-with-files plus fgrep-string; it writes matching lines as a file and a folder.
Use it when a host, URL, or scan dump needs a literal marker cut: a domain, status token, or tag. Fixed-string match means dots and slashes need no regex escaping.
Prefer grep-by-line for patterns. Prefer anew for uniqueness, not content. Empty output means the marker never appeared in the input stream.
use cases
Where fgrep-by-string fits
Filter noisy recon output to what matters
Pass a fixed marker such as a domain or a status token so a large URL or host file collapses to the lines that carry it, before they reach the next stage.
Search a whole folder of results at once
Point the folder input at a directory of files from a fan-out stage and pull every matching line across all of them in a single node, without merging them first.
Gate downstream stages on a marker
Keep only records that contain a specific tag, then feed the trimmed set into probing or scanning so those stages spend work only on lines that already qualify.
Match literal strings without regex escaping
Search for terms that contain dots, slashes, or brackets directly, since fixed-string matching treats the input as plain text rather than a pattern.
reference
fgrep-by-string inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| file | FILE | · | File whose lines are searched for the fixed string. |
| fgrep-string | STRING | · | Literal string to match against each line. |
| folder-with-files | FOLDER | · | Folder of files to search across in one run. |
Showing key inputs. fgrep-by-string exposes 3 inputs in total.
example
Run fgrep-by-string
# fgrep-by-string: keep host lines that mention example.com# inputs: file=hosts.txt fgrep-string=example.comfgrep -h -- example.com hosts.txtwww.example.comapi.example.commail.example.comdev.example.comstaging.example.comcdn.example.comvpn.example.comdocs.example.comguidance
Choosing fgrep-by-string
Reach for fgrep-by-string when you need a literal filter between pipeline stages: trim a large result set to lines that contain a known marker, or gate later work on that marker. Switch to a regex filter when one fixed term cannot describe the match.
grep-by-line
Matches lines against a pattern rather than a fixed string. Use it when you need regular expressions instead of an exact term.
anew
Appends only new, unique lines to a file. Built for dedup and change detection, not content filtering.
diff-trickest-files
Diffs two files to surface the change set. Better when you want what changed, not what matches a marker.
faq
fgrep-by-string questions
related
More Utilities tools
cewl
Spider a URL and return a wordlist for password crackers.
dnsgen
Wordlist and mined-word subdomain permutation.
pup
CSS selectors over HTML, the jq counterpart for markup.
unfurl
Extract chosen URL parts from stdin into clean line lists.
whisper
Speech to txt, vtt, srt, and json from an audio file or folder.
youtube-transcript
Public caption tracks to transcript.txt and results.jsonl.
Run fgrep-by-string yourself
A file of scan results feeds fgrep-by-string, which keeps only the lines that contain the search string and writes the matches as a queryable output.
Facts on this page come from the live Trickest tool library.