Trying to time a script fails with "applet not found" message:( Solved!

Delbert Franz ddf at sonic.net
Sat Apr 17 00:52:15 EDT 2010


On Friday 16 April 2010, marc zonzon wrote:
> On Fri, Apr 16, 2010 at 1:41 AM, Delbert Franz <ddf at sonic.net> wrote:
> > Having a lot of fun with the Nanonote especially sorting out some of
> > the idiosyncrasies of busybox.  For example, I wanted to time a
> > script, which invokes python multiple times to run a small program
> > repeatedly.  The script is named: doit.  I am working up to doing some
> > battery life tests on the Nanonote.
> >
> > When I execute
> >
> > time ./doit
> >
> > I get back an error message:
> >
> > doit: applet not found
> >
> > It appears the time command as implemented in busybox can only time
> > programs it "knows" about.  If executed alone, "doit" does what it is
> > supposed to do:) The time command also works correctly if used with
> > python but python is not an applet in busybox!  How does it "know"
> > python but not the script that I write?
> >
> > I searched the busybox mailing list archives and did not find
> > anything.  "Applet not found" almost always means that the applet in
> > question has not be included when busybox was compiled.  However, that
> > does not apply here: the argument following time is a program not just
> > a busybox applet.  If my interpretation is correct, this limits the
> > busybox time command rather severely.  Is there a work around?
> >
> > Thanks for any ideas.  I may have to join the Busybox mailing list to
> > submit my question there--too many lists and too little time:)
> >
> >                           Delbert
> >
> >
> >
> > _______________________________________________
> > discussion mailing list
> > discussion at lists.qi-hardware.com
> > http://en.qi-hardware.com/mailman/listinfo/discussion
> >
> 
> 
> Delbert
> 
> I tried to reproduce your bug, I made a script named doit, and tried
> time ./doit
> And it worked as expected. My busybox is a recompiled application to
> get some more applets, but if your busybox contains time, it must be
> no difference. May be this error is only for some specific script, may
> be you can try to give the simplest script that gives this strange
> behavior.
> 
> Marc

Marc,

Thanks for trying it.  Tonight I found the key to my problem;  I did not
have the standard first line:
#!/bin/sh

which under bash seems to be mostly optional.  However, the console
on the Nanonote is provied by ash, which is more limited.  Without that
first line, the time command gets confused and gives it enigmatic
message:)

                      Delbert






More information about the discussion mailing list


interactive