Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Sep 2004 03:23:19 -0400
From:      Mike Hauber <m.hauber@mchsi.com>
To:        freebsd-questions@freebsd.org
Subject:   Re: forcing a wraped output from the prompt
Message-ID:  <200409160323.19280.m.hauber@mchsi.com>
In-Reply-To: <20040916062114.GA28638@gothmog.gr>
References:  <200409151814.39129.m.hauber@mchsi.com> <20040916062114.GA28638@gothmog.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 16 September 2004 02:21 am, Giorgos Keramidas 
proclaimed:
> On 2004-09-15 18:14, Mike Hauber <m.hauber@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409160323.19280.m.hauber>