loading
loading
Utilities
Filter file or folder lines by a fixed string.
overview
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
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.
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.
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.
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
| 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: 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
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.
Matches lines against a pattern rather than a fixed string. Use it when you need regular expressions instead of an exact term.
Appends only new, unique lines to a file. Built for dedup and change detection, not content filtering.
Diffs two files to surface the change set. Better when you want what changed, not what matches a marker.
faq
related
Spider a URL and return a wordlist for password crackers.
Wordlist and mined-word subdomain permutation.
Import, export, and upsert workflow data against an Airtable base.
Decode Android APK files into smali sources and resources.
Check a file's values against conditions and exit with a matching code.
Authenticated Route53 hosted-zone inventory.
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.