Select order
Hi, I have some problem with displaying items of select. All items shoul be on separete line.
Code:
clear; IFS="\n"; Code:
Job: |
Take a look at the COLUMNS bash variable. You can try to set it to a low value, before the select construct.
|
Nothing is wrong! :) The select statement is working as expected (assuming the prompt to choose one of the options was snipped from what you posted).
|
Quote:
I try to find something about COLUMNS variable but nothing valuable I have. |
Quote:
|
All I found:
COLUMNS Used by the select builtin command to determine the terminal width when printing selection lists. Automatically set upon receipt of a SIGWINCH. Clever It works COLUMNS='\n' Thanks |
The behaviour of select is not defined. Here's a "roll-your-own" alternative
Code:
job=('Rename a file ' 'move' 'copy' 'find' 'view' 'edit' 'next') |
Quote:
|
All times are GMT -5. The time now is 04:18 PM. |