COLUMNS in busybox?

Rob Landley rob at landley.net
Mon May 1 19:23:03 UTC 2006


On Sunday 30 April 2006 3:50 pm, Alexander Krause wrote:
> Hi,
>
> I wrote a script to write stuff on the right side of a terminal for example
> like those '[ OK ]' messages in init-scripts.
>
> I'd like to implement it in a shell script like this:
> echor() {
>   printf "%${COLUMNS}s%s"  $1
> }
>
> The only problem I'm having is, that BB does not provide COLUMNS in my ENV
> :-(

Ok, when you say "bb does not provide" I'm assuming you're running one of 
busybox's shells?  (Which one?)

Also note that this can't automatically correct if you resize an xterm after 
the shell launches your applet, so it's never going to be reliable.

Rob
-- 
Never bet against the cheap plastic solution.



More information about the busybox mailing list