[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: No =?utf-8?q?=E2=80=98command=E2=80=99_command_in?= busybox?
From:       Mike Frysinger <vapier () gentoo ! org>
Date:       2009-07-09 21:56:33
Message-ID: 200907091756.33996.vapier () gentoo ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Thursday 09 July 2009 16:59:38 Denys Vlasenko wrote:
> On Tuesday 07 July 2009 23:16, Karl Ove Hufthammer wrote:
> > I have just started using busybox, and am impressed by the speed of
> > some of its utilities. However, when I tried using it on one of my
> > POSIX-based scripts, I got an error messages indicating that the
> > ‘command' command isn't implemented.
> >
> > Here is an example script, which gives ‘command: not found' errors when
> > run through busybox ash or sh:
> >
> > ---
> > command -v grep
> > command -v ls
> > ---
> >
> > The ‘command' command is defined in POSIX:
> > http://www.opengroup.org/onlinepubs/009695399/utilities/command.html
> >
> > I'm using the binary builds for my distro (Mandriva 2009.1), so initially
> > I expected that some compile options were missing when building this.
> > However, looking at the list of commands at
> > http://www.busybox.net/downloads/BusyBox.html
> > it seems there really is no ‘command' command. Is this true, and is there
> > any reason why? It does seem like quite a simple command. :)
>
> Those are applets. "command" is not an applet, it's a shell builtin.
>
> ash supports it:
>
> # ./busybox ash
> /.1/usr/srcdevel/bbox/fix/busybox.t1 # command -v grep
> /bin/grep
>
> However, hush does not:
>
> # ./busybox hush
> /.1/usr/srcdevel/bbox/fix/busybox.t1 # command -v grep
> hush: can't execute 'command': No such file or directory
>
> What is the version of busybox you tried?

i didnt bother implementing it because ive never seen anyone use `command`.  
everyone uses `type`.  it should be trivial to implement as it'll be largely 
an alias to `type`.
-mike

["signature.asc" (application/pgp-signature)]

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic