On Friday 24 July 2009 08:19:24 am Randall R Schulz wrote:
#!/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.
Hmm, I'll have to wade the frigid waters of man bash again... -- 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