[ale] Utility to word-wrap plain text?
Stephen R. Blevins
srblevi at worldnet.att.net
Wed Mar 28 15:42:02 EDT 2007
What about this? [Looks cleaner to me]
echo "${FORM_message}" | fold -s -w-=72
Chuck Huber wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> ale-request at ale.org wrote:
> ...
>
>
>> Message: 2
>> Date: Wed, 28 Mar 2007 09:37:43 -0400
>> From: "Cox, Danny" <dcox at icc.net>
>> Subject: Re: [ale] Utility to word-wrap plain text?
>> To: "Atlanta Linux Enthusiasts" <ale at ale.org>
>>
>
>
>> Try 'fmt'.
>> Danny Cox
>>
>
> Danny,
>
> fmt did it. Thanks.
>
> Charles had suggested fold. However it is not word-aware in that it cut the
> line in mid-word.
>
>
> Here's the resulting code:
> #
> # Evaluate the form, placing form variables in the environment
> # under the name FORM_xxx
> # This can only be called once since it handles form submission
> # through POST. i.e. it reads stdin for form elements.
> #
> e
> `eval proccgi $*`
> ...
> echo "${FORM_message}" | sed -e 's/^M/\n/g' | fmt --split-only --width=72
> ...
>
> Thanks for the help.
>
> Enjoy,
> - Chuck
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGCqioiR3HaLbYCa4RAjfkAJwPK3qiNfdEFELcbmNX/XJ2NH8GeACg+Lbb
> aly7JypH2aNJWgHlYrwnTiI=
> =jiyh
> -----END PGP SIGNATURE-----
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
>
--
Stephen R. Blevins
srblevi at worldnet.att.net
More information about the Ale
mailing list