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.
User avatar
Site Admin
Site Admin
Posts: 5781
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil

Re: Language selection tool

Post#46 by brokenman » 13 Dec 2016, 15: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.

User avatar
Posts: 1443
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 3.1.0 x86-64 XFCe
Location: Germany

Re: Language selection tool

Post#47 by Rava » 22 Dec 2016, 19: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

Post Reply