Language selection tool

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.

Re: Language selection tool

Postby brokenman » 13 Dec 2016, 16:37

But I know of no trick for any bash script to be able to read $COLUMNS

Code: Select all

columns=$(tput cols)
echo "Columns: " $columns
How do i become super user?
Wear your underpants on the outside and put on a cape.
Site Admin
Site Admin
Posts: 5381
Joined: 27 Dec 2010, 04:50
Location: Brazil
Distribution: Porteus v3.2rcX all desktops

Re: Language selection tool

Postby Rava » 22 Dec 2016, 20:55

tput, yes, I tend to forget about tput...

Also, this might be helpful as well:
Code: Select all
shopt -s checkwinsize ... iltin.html

If set, Bash checks the window size after each command and, if necessary, updates the values of LINES and COLUMNS.

And then we have this:
Code: Select all
stty size

Useful code:
(I just read over it but I have not tested every line)
Yours Rava
User avatar
Posts: 1289
Joined: 11 Jan 2011, 03:46
Location: Germany
Distribution: Porteus 3.1.0 x86-64 XFCe


Return to Development

Who is online

Users browsing this forum: No registered users and 3 guests