Utilities
Turn bare hosts into URLs with a line prefix
Prepend one string to each line in a file or folder.
Free plan: 1 user, 3 execution slots, no card.
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.
image quay.io/trickest/prefix-file-lines:v1.0.0
use cases
prefix-file-lines use cases
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
prefix-file-lines command examples
# prefix-file-lines: turn hosts into https URLs
prefix-file-lines --prefix 'https://' hosts.txthttps://www.example.com
https://api.example.com
https://dev.example.com
https://staging.example.com
https://mail.example.comguidance
prefix-file-lines vs alternatives
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.
| Tool | Pick it when |
|---|---|
| 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 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 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.