On 6/24/17 7:46 AM, sky...@top-email.net wrote: > It is necessary to refresh the variable $COLUMNS in a script (COLUMNS="tput > cols") otherwise the command "select" will not set the number of columns > correctly for actual screen resolution.
So you are saying that the value of COLUMNS passed in the environment is not correct? Or that it's not present? When the shell isn't interactive, it relies on the value passed in the environment. It's not the shell's role to second-guess the environment value and change it regardless of whather or not it's "correct". If the value doesn't appear in the environment, it's the programmer's responsibility to make sure that the correct value is set. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/