FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 11-24-2010, 02:13 AM
Magicloud Magiclouds
 
Default Wondering about the print out function of PS

On Tue, Nov 23, 2010 at 6:24 PM, Jochen Schulz <ml@well-adjusted.de> wrote:
> Camaleón:
>> On Tue, 23 Nov 2010 17:29:49 +0800, Magicloud Magiclouds wrote:
>>
>>> But I do not know how it gets the width of the screen.
>>
>> Well... gathering information about the running terminal is possible:
>>
>> sm01@stt008:~$ stty -a | grep column
>> speed 38400 baud; rows 63; columns 86; line = 0;
>
> Or simply:
>
> $ echo $LINES $COLUMNS
> 31 107
>
> (Don't know whether that's terminal/shell-specific.)
>
> J.
> --
> When I get home from the supermarket I don't know what to do with all the
> plastic.
> [Agree] * [Disagree]
> * * * * * * * * <http://www.slowlydownward.com/NODATA/data_enter2.html>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkzrlm0ACgkQ+AfZydWK2zmFuQCffCMPBm+UNB iplloViJX6vyQr
> bggAmwc3ZjH4BzZ5As0cde4Y3X9uKo23
> =Vl5v
> -----END PGP SIGNATURE-----
>
>

$COLUMNS and $LINES are not in `env`, I cannot get it within my program.

--
竹密岂妨流水过
山高哪阻野云飞


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: AANLkTino_11bZXsop0VTr-4B+Cu=oqkAZdxYuLEMfUQ6@mail.gmail.com">http://lists.debian.org/AANLkTino_11bZXsop0VTr-4B+Cu=oqkAZdxYuLEMfUQ6@mail.gmail.com
 
Old 11-24-2010, 03:58 AM
Carl Johnson
 
Default Wondering about the print out function of PS

Magicloud Magiclouds <magicloud.magiclouds@gmail.com> writes:

> On Tue, Nov 23, 2010 at 6:24 PM, Jochen Schulz <ml@well-adjusted.de> wrote:
>> Camalen:
>>> On Tue, 23 Nov 2010 17:29:49 +0800, Magicloud Magiclouds wrote:
>>>
>>>> But I do not know how it gets the width of the screen.
>>>
>>> Well... gathering information about the running terminal is possible:
>>>
>>> sm01@stt008:~$ stty -a | grep column
>>> speed 38400 baud; rows 63; columns 86; line = 0;
>>
>> Or simply:
>>
>> $ echo $LINES $COLUMNS
>> 31 107
>>
>> (Don't know whether that's terminal/shell-specific.)
>
> $COLUMNS and $LINES are not in `env`, I cannot get it within my program.
>
I think I had similar problems but I got around it by exporting them in
my .bash_profile, so I just have:

export LINES COLUMNS

--
Carl Johnson carlj@peak.org


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87hbf7uxl4.fsf@oak.localnet">http://lists.debian.org/87hbf7uxl4.fsf@oak.localnet
 

Thread Tools




All times are GMT. The time now is 01:43 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org