[Toybox] [patch?] nl

Isaac idunham at lavabit.com
Sun Jul 28 16:34:25 PDT 2013


On Fri, Jul 26, 2013 at 07:17:49PM -0500, Strake wrote:
> Is its section feature actually used? I wrote nl sans it:
> 
Oh yes. 
Anyone who uses nl for documents will need it.
That includes autogenerated source documentation with page numbers.
(IIRC, MIT's xv6 uses it this way).
That means add -d, -f, and -h.
Also -i is useful; I thought I heard that dash or some other shell with a BSD
ancestry used -v in its buildscripts, but could be wrong.
Full POSIX is "pb:d:f:h:i#l#n:s:v#w#".

> # HG changeset patch
> # User Strake
> # Date 1374880988 18000
> # Node ID 33fe2af56d2d80f2cc9ecd26a173b1f718e1f721
> # Parent  16ed6e15cd35c0d9798150e769de3155dc6a2e9b
> add nl
> 
> diff -r 16ed6e15cd35 -r 33fe2af56d2d toys/pending/nl.c
> --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
> +++ b/toys/pending/nl.c	Fri Jul 26 18:23:08 2013 -0500
> @@ -0,0 +1,101 @@
> +/* nl.c - print line numbers
> + *
> + * Copyright 2013 CE Strake <strake888 at gmail.com>
> + *
> + * See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/
> + * See http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/cmdbehav.html
> +
> +USE_NL(NEWTOY(nl, "Eb:n:s:w#", TOYFLAG_BIN))
> +


 1375054465.0


More information about the Toybox mailing list