slitaz-base-files rev 188 5.2.3
libtaz.sh: use stty size
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Fri Jun 01 08:31:18 2012 +0200 (2012-06-01) |
parents | a98c41a45fa4 |
children | cf285bb82236 |
files | rootfs/lib/libtaz.sh |
line diff
1.1 --- a/rootfs/lib/libtaz.sh Sat May 26 00:37:54 2012 +0200 1.2 +++ b/rootfs/lib/libtaz.sh Fri Jun 01 08:31:18 2012 +0200 1.3 @@ -40,7 +40,7 @@ 1.4 1.5 # Get terminal columns 1.6 get_cols() { 1.7 - stty -a 2>/dev/null | head -n 1 | cut -d ";" -f 3 | awk '{print $2}' 1.8 + stty size | cut -d " " -f 2 1.9 } 1.10 1.11 # Return command status. Default to colored console output.