Utilities
Turn bare hosts into URLs with a line prefix
Prepend one string to each line in a file or folder.
overview
What prefix-file-lines does
Sit prefix-file-lines between recon output and any stage that expects scheme-qualified URLs or rooted paths.
Operators reach for it when a host list, wordlist, or merge sink needs the same prefix on every line without writing a script.
Inputs are file or folder plus prefix-string. For end-of-line stamps use suffix-file-lines; for structured URL rewrite use unfurl or qsreplace.
use cases
Where prefix-file-lines fits
Turn bare hosts into URLs
Prefix a list of hostnames with https:// so a crawler or HTTP prober downstream receives well-formed URLs instead of bare names.
Adapt one tool's output to the next tool's input
Add the scheme, parameter, or label a downstream node expects so two stages connect without a custom script in between.
Tag results before a merge
Prefix each line with a source marker so that when several files merge into one sink, you can still tell where each entry came from.
reference
prefix-file-lines inputs and flags
| Name | Type | Flag | Description |
|---|---|---|---|
| file | FILE | · | Folder with files that need a prefix for each line |
| folder | FOLDER | · | Folder with files that need a prefix for each line |
| prefix-string | STRING | · | String that will be appended to each line. |
Showing key inputs. prefix-file-lines exposes 3 inputs in total.
example
Run prefix-file-lines
# prefix-file-lines: turn hosts into https URLsprefix-file-lines --prefix 'https://' hosts.txthttps://www.example.comhttps://api.example.comhttps://dev.example.comhttps://staging.example.comhttps://mail.example.comguidance
Choosing prefix-file-lines
Use when the next stage needs a fixed prefix on every line, such as https:// on bare hosts. Prefer suffix-file-lines to append. Prefer unfurl or qsreplace for component-level URL edits.
suffix-file-lines
Mirror tool that appends a string to the end of each line instead of the start.
unfurl
Parses and reformats URL components. Use when you need structured rewrite, not a flat prefix.
anew
Appends only new unique lines to a file. Pair with a prefix step when deduping a growing list.
faq
prefix-file-lines questions
related
More Utilities tools
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.
dnsgen
Wordlist and mined-word subdomain permutation.
duckdb
In-process SQL on CSV, JSON, and Parquet. No server.
edge-tts
Microsoft Edge neural speech from text or a script file. No API key.
Run prefix-file-lines yourself
A host list feeds prefix-file-lines, which prepends https:// to each line and hands the URLs to httpx for probing before they land as output.
Facts on this page come from the live Trickest tool library.