pipr.tools

suffix

Append text to every line

Aa Text

Try it

stdin0 chars
stdout0 chars

Flags

--text string default:

Example

Add trailing commas to each line

Usage
$ echo "apple
banana
cherry" | suffix
View source
(input, opts = {}) => {
      const sfx = opts.text || "";
      return input
        .split("\n")
        .map((l) => l + sfx)
        .join("\n");
    }

Suggested Pipelines

Related Tools