[ale] Utility to word-wrap plain text?

Charles Shapiro hooterpincher at gmail.com
Wed Mar 28 09:36:42 EDT 2007


Ooh, first post!

echo $VARIABLE | fold 72

Is the most basic thing you want.  You can of course look up fold(1) with
your handy-dandy man(1) command.

-- CHS

On 3/28/07, Chuck Huber <chuck at cehuber.org> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Good morning,
>
> I have users of a web site submitting text in a <textarea> tag.  The form
> is
> later delivered to via email.
>
> The problem I'm encountering is that while the user types in the textarea,
> words
> are automatically wrapped within the space provided.  However, when I
> receive
> the contents of the tag, no word wrapping occurs unless the user
> specifically
> included a newline.
>
> Does anyone have any ideas on how I can take the contents of a bash shell
> variable and word-wrap it to, oh say, 72 columns?
>
> Thanks,
>     - Chuck
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGCm7IiR3HaLbYCa4RAo1iAKDqWsLlus5LnDofM2AZgiQSNTHMAgCfSInv
> y8JqkhmyV1eIE03DWBffM10=
> =ehVL
> -----END PGP SIGNATURE-----
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>
-------------- next part --------------
An HTML attachment was scrubbed...




More information about the Ale mailing list