trim(1)

NAME
tri (done) ove trailing spaces
                    (Rev. August-2010)

SYNTAX
trim [-v] [-b|-bs] [-t] [file...]

DESCRIPTION
The trim just removes the trailing spaces from the specified file, or the standard input; the result is printed on the standard output. trim is noticeably faster than sed 's/ *$//', especially for file with long lines.

With the -v option, trim prints also a line of statistics for each file: number of lines, of empty lines, number of stripped bytes, and the length of the longest record.

OPTIONS

-v asks for a line of statistics for each file: number of lines, of empty lines, number of stripped bytes, and the length of the longest record.

-b asks to remove the blanks only - by defaults, all trailing space characters (especially tabs) are removed.

-bs asks to squeeze the blanks: multiple blanks are replaced by a single blank.

-t asks to expand the tabs as in expand(1)

RETURNED STATUS
trim retuns 0 in case of success, and 1 if something failed (inexistant or inaccessible file)

SEE ALSO
expand(1) sed(1)