Tiny Core Linux
Tiny Core Base => TCB Bugs => Topic started by: dentonlt on January 19, 2016, 07:22:06 PM
-
I have 6.4 and 7.0beta1 at home - both missing the busyboxy 'length' applet. /usr/bin/length exists.
Perhaps others running 5.x and 4.x can confirm whether the length applet exists on those releases?
-
Hi dentonlt
On TC4, length is missing from busybox and /usr/bin/length is a link back to /bin/busybox.
-
If you enter the command "busybox" it will list all of the available commands.
-
Hi Juanito
Yes, I realize that. The command is not compiled into busybox but is included in /usr/bin/:
tc@box:~$ which length
/usr/bin/length
tc@box:~$ ls -l /usr/bin/length
lrwxrwxrwx 1 root root 17 Nov 16 2011 /usr/bin/length -> ../../bin/busybox
tc@box:~$ length
length: applet not found
tc@box:~$
-
I looked quickly at a couple of busybox config files and "length" is not mentioned...
-
Hi Juanito
It is listed here:
https://busybox.net/BusyBox.html#length
-
Sure :)
I meant that it is not mentioned one way or the other in the config - i.e. whether to compile it in or leave it out.
-
Hi Juanito
It shows up in this config file under Coreutils:
http://siso.sourceforge.net/ap-busybox-config.html
-
It was removed from busybox in 2011. We need to remove the symlink.
-
Hi curaga
Thank, that explains it. It never occurred to me it might have been removed.
-
Hi Juanito
Sorry if I sent you on a wild goose chase.
-
Hi dentonlt
According to this:
https://gitlab.com/dstam/sali/blob/master/CHANGELOG
* Since busybox 1.19.0 command length has been removed. Now using ${#VAR}
to get the length of the variable VAR.
Author: Dennis Stam
tc@box:~$ echo $PWD
/home/tc
tc@box:~$ echo ${#PWD}
8
tc@box:~$
-
Thanks, all - this makes sense. Good to know the link it was only a loose end.
FWIW ... I expect ${#foo} is faster. Maybe I'll make a little script to find out. :p