COLUMNS in busybox?

Rich Felker dalias at aerifal.cx
Tue May 2 14:33:36 UTC 2006


On Tue, May 02, 2006 at 04:02:57PM +0200, walter harms wrote:
> 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

Except that the values of A and B will be lost by the time the next
line starts. You must instead do:

read A B <<EOF
`stty size`
EOF

This is due to pipe semantics.

Rich




More information about the busybox mailing list