forcing a wraped output from the prompt
Mike Hauber
m.hauber at mchsi.com
Thu Sep 16 00:22:49 PDT 2004
On Thursday 16 September 2004 02:21 am, Giorgos Keramidas
proclaimed:
> On 2004-09-15 18:14, Mike Hauber <m.hauber at mchsi.com>
wrote:
> > I seem to remember this question asked before (mayhaps
> > a different OS), but I'm not finding it anywhere (my
> > wording is off?)
> >
> > Is there any way to force the output of a program to
> > wrap at the console without redefining the console
> > itself (ie, if I wanted to wrap the output of something
> > like fortune to 30 characters, how can I do that at the
> > prompt)?
>
> Yes there is. Use stty(1).
>
> I'm customarily running my consoles with a 132x25 mode,
> but sometimes I want to force 100 columns or less (i.e.
> when I'm reading a web page in elinks or w3m). This is
> easily done with:
>
> $ stty columns 100
>
> and another stty invocation when I'm done to reset
> columns to 132.
>
> - Giorgos
>
Actually, that's what I was wanting to avoid. I didn't want
to change the environment itself, just the output of a
program. Craig reminded me of 'fmt' which is something
that I've never had to use before, and it's exactly what I
was needing. Thanks for the feedback, though.
Much Appreciated,
Mike
More information about the freebsd-questions
mailing list