[Toybox] [toybox] fold implementation

Rob Landley rob at landley.net
Thu Apr 3 05:15:14 PDT 2014


I apologize for anything gmail's reply function does to this message.
It's... opinionated.

On Wed, Apr 2, 2014 at 11:16 PM, Robert Thompson
<robertt.thompson at gmail.com> wrote:
> I personally would also find a pure simple single-purpose "unfold" useful.
>
> If you feel like going just a touch beyond a simple "unfold", you might want
> to look at the fmt utility. I've seen several scripts in the wild that used
> fold and/or fmt. A couple of them used fold to do the folding and fmt (with
> really long maximum line specified) to unfold, which I thought was
> strange... after all, if you've got fmt, you can use it to do both "folding"
> and "unfolding", but whatever.

I've looked at fmt and it is interesting, but it's not in posix or lsb
so I'm not entirely sure what functionality to implement. (The
gnu/dammit version's man page is a stub telling me to install the
"info" command, which isn't happening.)

> One thing to be aware of, it seems that there isn't a lot of consensus in
> terms of the fmt arguments. If there's a standard, it looks like it's mostly
> ignored.
>
> http://en.wikipedia.org/wiki/Fmt
>
> http://www.freebsd.org/cgi/man.cgi?query=fmt&sektion=1&apropos=0&manpath=FreeBSD+6.2-RELEASE
>
> http://www.gnu.org/software/coreutils/manual/html_node/fmt-invocation.html

Ooh, good links. Thanks.

Rob

 1396527314.0


More information about the Toybox mailing list