Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jun 2012 21:24:26 +0100
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        freebsd-questions@FreeBSD.org
Subject:   Re: text format
Message-ID:  <4FD7A57A.4050203@FreeBSD.org>
In-Reply-To: <201206122011.q5CKB557038063@mail.r-bonomi.com>
References:  <201206122011.q5CKB557038063@mail.r-bonomi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig9C02D1DC5B69CAD01E43B61C
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 12/06/2012 21:11, Robert Bonomi wrote:
>> im only asking what cmd should i use to format an ascii text to be=20
>> > identical to that one, centered and aligned..

> There *ISN'T* any simple command-line tool that will do what you want,
> all "automatically".

I dunno.  'fmt -c' looks pretty close to me.  Seems to work best if you
wrap the lines first, then center:

% fmt 65 72 < lorem-ipsum.txt | fmt -c


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin ac
metus nisi. Praesent sit amet accumsan diam. Lorem ipsum dolor sit
 amet, consectetur adipiscing elit. Nullam lobortis tortor vitae
 arcu pretium et hendrerit lectus semper. Pellentesque ante diam,
 dictum vel adipiscing vel, rutrum eget elit. Nam et metus nulla.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed convallis
 dui sit amet ligula imperdiet at tincidunt arcu euismod. Nullam
 posuere imperdiet est et mattis. Sed nunc leo, vehicula faucibus
porttitor luctus, aliquam at tortor. Aliquam hendrerit condimentum
nibh, eu interdum quam sodales id. Morbi aliquam fermentum lorem a
                            molestie.

Donec commodo odio a mauris elementum semper. Aliquam at massa vel
magna vehicula consequat in a tortor. Proin ut est eu lectus aliquet
blandit eget vel nulla. Donec risus dolor, tempor ut ultricies quis,
adipiscing a dolor. Lorem ipsum dolor sit amet, consectetur adipiscing
elit. Ut adipiscing metus sed justo accumsan tempus. Ut sollicitudin
aliquet lorem et faucibus. Maecenas vel metus ut diam luctus fermentum
  sollicitudin eu neque. Cras vitae ipsum sit amet justo aliquam
placerat id consectetur urna. Pellentesque vitae mi eu lorem tincidunt
         feugiat. Quisque vel orci mi, nec ornare dolor.

	Cheers,

	Matthew


--=20
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey




--------------enig9C02D1DC5B69CAD01E43B61C
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/XpYMACgkQ8Mjk52CukIzUKwCcC3pjmlpgtuvH7HsT6NduNzlj
AFcAn30pmLyNqzNVS7eKVsHNpwQttvGB
=HEmd
-----END PGP SIGNATURE-----

--------------enig9C02D1DC5B69CAD01E43B61C--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FD7A57A.4050203>