COLUMNS in busybox?

Alexander Krause alexander.krause at erazor-zone.de
Sun Apr 30 19:50:41 UTC 2006


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 :-(

Well, I'm not quite sure if there is another way to get the column-count or 
maybe there is already some kind of echor implemented?

Anyway, what about adding COLUMNS in ENV when 'CONFIG_FEATURE_AUTOWIDTH=y' is 
set?

Opinions? :-)

-- 
Alexander Krause
Amtmann-Kästner-Platz 11
99091 Erfurt

Mail alexander.krause at erazor-zone.de
Tel. +49 (179) 4725826



More information about the busybox mailing list