From owner-freebsd-questions@FreeBSD.ORG Thu Sep 16 07:22:49 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 392A016A4CE for ; Thu, 16 Sep 2004 07:22:49 +0000 (GMT) Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id E2FDA43D48 for ; Thu, 16 Sep 2004 07:22:48 +0000 (GMT) (envelope-from m.hauber@mchsi.com) Received: from [10.51.10.3] (12-219-204-133.client.mchsi.com[12.219.204.133]) by sccmmhc92.asp.att.net (sccmmhc92) with ESMTP id <20040916072248m920073gn5e>; Thu, 16 Sep 2004 07:22:48 +0000 From: Mike Hauber To: freebsd-questions@freebsd.org Date: Thu, 16 Sep 2004 03:23:19 -0400 User-Agent: KMail/1.7 References: <200409151814.39129.m.hauber@mchsi.com> <20040916062114.GA28638@gothmog.gr> In-Reply-To: <20040916062114.GA28638@gothmog.gr> X-Copyright: 2004, Michael C. Hauber. All rights reserved. X-Notice: Duplication, modification, and/or redistribution are prohibited without proper consent from the author. MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200409160323.19280.m.hauber@mchsi.com> Subject: Re: forcing a wraped output from the prompt X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: m.hauber@mchsi.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2004 07:22:49 -0000 On Thursday 16 September 2004 02:21 am, Giorgos Keramidas proclaimed: > On 2004-09-15 18:14, Mike Hauber 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