Utilities
Keep lines that contain a fixed marker
Filter file or folder lines by a fixed string.
Free plan: 1 user, 3 execution slots, no card.
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.
image quay.io/trickest/fgrep-by-string:v1.0.0
use cases
fgrep-by-string use cases
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
fgrep-by-string command examples
# fgrep-by-string: keep host lines that mention example.com
# inputs: file=hosts.txt fgrep-string=example.com
fgrep -h -- example.com hosts.txtwww.example.com
api.example.com
mail.example.com
dev.example.com
staging.example.com
cdn.example.com
vpn.example.com
docs.example.comguidance
fgrep-by-string vs alternatives
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.
| Tool | Pick it when |
|---|---|
| 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 FAQ
related
More Utilities tools
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.
browser-fetch
Headless Chromium render: requested URL, final URL, status, and title next to the page.
cewl
Spider a URL and return a wordlist for password crackers.
csvkit
SQL on one CSV. The table name is the file stem.
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.