Backslashed escape sequences

Rob Landley rob at landley.net
Mon Sep 22 15:30:13 UTC 2008


On Monday 22 September 2008 06:03:01 Roy Marples wrote:
> On Mon, 2008-09-22 at 05:20 -0500, Rob Landley wrote:
> > > I'm not sure (vda) how you'll adopt "their" behavior, as "they" differ.
> > > It comes down to scope; I don't think BusyBox has ever adopted bash as
> > > a standard to follow,
> >
> > Yes, it has.
>
> No, busybox has adopted a few shells, of which ash is probably the most
> POSIX compliant one. busybox has never adopted bash.

Bash as a codebase to use, no.  Bash as a de-facto Linux standard against 
which to compare its shell behavior, yes.  (CONFIG_ASH_BASH_COMPAT anyone?)

> > Now these were mostly old versions of bash.  I stopped paying attention
> > to anything that went in after 2.04b.  But things like curly bracket file
> > listing syntax, or echo needing -e?  You encounter them all over the
> > place in Linux.
> >
> > (And note that if you use dash, echo doesn't support options at all.
> > No "echo -e" or "echo -n".  Yeah, that breaks things.)
>
> Such scripts should use #!/bin/bash instead of #!/bin/sh.

No scripts should use #!/bin/sh anymore, Ubuntu broke that symlink with the 
Defective Annoying SHell.  Which means that at some point, Busybox is going 
to have to provide a #!/bin/bash symlink if it wants to be able to run things 
like the linux kernel's scripts/gen_initramfs_list.sh.

In the meantime, the minimal self-bootstrapping environment is still seven 
packages, one of which is bash.

> If you want bash features then explicitly use bash. If you want bash
> features in /bin/sh then get the The Open Group to adopt them :)

If you want to use Solaris, you know where it is.

> > I have several scripts that use \e as the start of ansi escape sequences,
> > by the way.  (Octal's a bit 1970's for my tastes...)
>
> Again, suggest your idea to the The Open Group or just use bash.

Please delete the "mount" command off your system, since it's not in The Open 
Group Base Specifications, so obviously you can't possibly need it.

> I like the ability to use /bin/sh so my scripts work on default base
> systems such as NetBSD where bash not available by default.

You've used busybox on netbsd?  (Without a Linux compatability layer?)  This 
is new...

Rob



More information about the busybox mailing list