Shell - Accessing COLUMNS in a script!?
Hello,
I would like to know : How can we be able to use the COLUMNS variable in a script??? I have done a script wich needs $COLUMNS in order to print a correct output. Now what I hace is COLUMNSV=$3 So when i call thje function, i use Code:
fkldrb 100 0.01 $COLUMNS How can I have access to it in the script? Thank you, BlueSpirit |
Quote:
Quote:
Quote:
In a script the $LINES and $COLUMNS environment variables cannot be retrieved as they are not exported in the shell. Use export LINES in the shell before you call your program (not in a script). You can add it to your .profile if you want to have them set always. jlinkels |
consider sed-awk for $row/ $column processing
|
use export to set the value of the variable COLUMNS. then use $COLUMNS to pass the value to your program
example: Code:
mustafa@LILPC ~$ export COLUMNS=3 Quote:
|
All times are GMT -5. The time now is 02:10 AM. |