Add Suffix to Each Line
Append a string to every line. Optional skip-empty option keeps blank lines clean.
About Add Suffix to Each Line
This tool appends the same string to the end of every line. It's the natural complement to add-prefix — use them together to wrap each line with bracketing text, like turning a list of items into a series of bullet points or function calls.
When to use it
- Adding line terminators to records (';' at end of SQL statements)
- Producing tag-like output by appending ',' to each line
- Adding closing brackets to lines that were prepended with opens
- Marking lines with a consistent trailing label
How it works
Lines are split on LF/CRLF. The suffix string is appended to each line. When 'skip empty lines' is enabled, blank lines are left blank.
Examples
foo bar baz (suffix=',')
foo, bar, baz,
Frequently asked questions
- Can I add both a prefix and a suffix?
- Run add-prefix first, then add-suffix on the result. Each tool focuses on one end of the line.
- What if I want a trailing newline?
- Append '\n' as the suffix and the output will have blank lines between every line.