Subject: Re: fmt utility from NetBSD
To: Ignatios Souvatzis <is@NetBSD.org>
From: Aleksey Cheusov <cheusov@tut.by>
List: tech-userlevel
Date: 04/24/2006 21:30:08
> On Mon, Apr 17, 2006 at 11:07:24AM +0300, Aleksey Cheusov wrote:
>>
>> I personally think that GNU fmt -s option is useful.
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>> -s, --split-only
>> split long lines, but do not refill
>> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> FOLD(1) NetBSD General Commands Manual FOLD(1)
Unfortunately, 'fold -s' != 'GNU fmt -s'
0 ~>printf ' q w e r t y u i o p\n' | fold -s -w 10
q w e
r t y u i
o p
0 0 ~>printf ' q w e r t y u i o p\n' | gfmt -s -w 10
q w
e r t
y u i
o p
0 0 ~>
BTW, fmt utility shipped with Solaris9 and Heirloom fmt
works like GNU fmt. FreeBSD and OpenBSD use -s option differently.
All fmt utilities I've seen support at least -c and -w.
--
Best regards, Aleksey Cheusov.