automated COL and WCOL settings

Mark Hymers mark-lfs at hymers.org.uk
Thu Jul 19 11:38:42 PDT 2001


On Thu, 19, Jul, 2001 at 06:38:02PM +0200, Andre Wyrwa wrote:
> On Thu, 19. Jul 2001 um 02:54:58PM +0100, Mark Hymers wrote:
> > I've been looking and the problem with xterms appears to be that they
> > (and konsoles for example) don't export COLUMNS and so the script
> > assumes that we are on /dev/console and so uses whatever width that is
> > set too.  There will be a solution - probably really simple - so I'll
> > have a look as soon as I can.
> 
> I guess you wanted to say that it doesn't export CONSOLE ?
> Hmm...how about this one.
> 
> test -x /usr/bin/tty && CONSOLE=`/usr/bin/tty`
> test -z "$CONSOLE" && CONSOLE=/dev/console
> ...
> 
>
I'll try that.  It is COLUMNS though that isn't exported.  I can do echo
$COLUMNS from bash (you remember the discussion about that variable) and
it gives me the correct value.  In the script however, it doesn't know
about it.  I'll try your suggestion as a workaround though.

Thanks

Mark 
-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the lfs-dev mailing list