24 Jul
2009
24 Jul
'09
13:19
On Thursday July 23 2009, David C. Rankin wrote:
...
OK,
This is it!
#!/bin/bash --norc tmp=$(stty -a) tmp=${tmp##*rows\ } rows=${tmp%%;*} tmp=${tmp##*columns\ } cols=${tmp%%;*} echo "rows: $rows; cols: $cols"
Now it they just don't change the output format of stty -a....
There is a generalized substitution variant of the variable expansion syntax that is a that can strip content from around (from both sides) in a single expansion. That would clean up the foregoing code.
-- David C. Rankin
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org