On Thursday 23 July 2009 09:43:12 pm David C. Rankin wrote:
On Thursday 23 July 2009 09:22:34 pm David C. Rankin wrote:
Listmates,
Here is one I'm having difficulty understanding. As part of your environment the "LINES" and "COLUMNS" variables are defined telling you the number of lines and columns an xterm has. Many old script examples make use of them. Now, I can't make use of them? Specifically, from the command line:
echo $COLUMNS
properly returns the number of columns for the terminal. But calling or assigning $COLUMNS in a script no longer works. Try this in a bash script:
#!/bin/bash echo $COLUMNS exit 0
Nothing?? Why?
OK,
When did "LINES" and "COLUMNS" stop being exported?
Hmm: [21:58 alchemy:/home/david] # grep COLUMNS /etc/* /etc/profile: export LINES COLUMNS TERM Has the something with the shell changed that makes the export no longer available to scripts? Shell type? (login, etc..) -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org