SuperScript::Software::miscellanea

The foldlines program


Interface

  foldlines cols
where cols is a positive decimal number.

foldlines read lines from standard input, breaks each line into lines of length at most cols, and prints the result to standard output.

If it sees the end of input, foldlines exits 0. If it encounters a temporary error, foldlines exits 111. If it encounters a usage error, foldlines exits 100.

foldlines is idempotent.