trim: A command-line tool for trimming whitespace

[ bsd3, library, program, text ] [ Propose Tags ]

trim is a simple command-line tool for removing unwanted whitespace from files

[Skip to Readme]


[Index] [Quick Jump]


Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Versions [RSS]
Change log
Dependencies base (>= && <4.13), directory (>=1.3 && <1.4), optparse-applicative (>=0.14 && <0.15) [details]
License BSD-3-Clause
Author Andrew Lee
Category Text
Home page
Source repo head: git clone
Uploaded by ndrewtl at 2019-01-30T22:42:35Z
Executables trim
Downloads 546 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2019-01-30 [all 1 reports]

Readme for trim-

[back to package description]


Build Status

trim is a simple unix-philosophy tool to trim trailing whitespace from a file. It is designed to be simple and transparent. It takes input from stdin and output from stdout, for easy piping.


trim [-N|--newlines] [-o|--output ARG] [FILE]

trim with no flags takes input from stdin and prints to stdout. It trims trailing whitespace from each line, but does not trim additional newlines.

  • [FILE] The file to read from. If FILE is a single hyphen - or unspecified, read from standard input.

  • --output, -o [FILENAME] write to the given filename instead of stdout

  • --newlines, -N Trim trailing newlines as well


Build with cabal v2-build