COLUMNS in busybox?

walter harms wharms at bfs.de
Tue May 2 14:02:57 UTC 2006


sorry i can not resist, here a less expensive version
that get ROW and COL.

happy hacking,
  walter

stty size | while  read A B ; do echo "ROW=$A COL=$B" ; done

Alexander Krause wrote:
>> here you go:
>>     COLUMNS=$(stty -a | sed -e 's/.*rows \([0-9]\+\).*/\1/' -e 1q)
> Oh great, i forgot about stty, I'm using
> COLUMNS=$(stty -a | sed -e 's/.*columns \([0-9]\+\).*/\1/' -e 1q)
> now ;-)
> 
> thanks so far!
> 
> cheers Alex



More information about the busybox mailing list