[PATCH] Ash support for replace and subsitution

Paul Smith paul at mad-scientist.us
Mon Mar 24 17:14:39 UTC 2008


On Mon, 2008-03-24 at 16:51 +0000, James Simmons wrote:
> I have no problem with a NON_POSIX_EXTENSIONS. Is this true with the
> other patches I posted?

Well, maybe we should wait for a ruling by Denys or someone.  I'd really
love to have a POSIX-standard shell in busybox, and I had this idea that
that was a design goal of ash.

But I could be wrong.  For example, the extended test notation [[ ... ]]
is not POSIX, but (according to your patch; I haven't checked it myself)
it's already supported.

Also, it's not clear to me (again I haven't checked the code) what area
your second patch touches; the subject said "more test conditions" but
I've never seen a test(1) utility that supports <<=, etc. which seemed
to have already been supported by this applet.

Maybe you mean the shell arithmetic expression operators, $(( ... ))?
This does support things like <<= as well as && and || and <= etc.  But
it doesn't support the new operators you added, such as -a and -o, as
well as -eq etc... inside an arithmetic expression all conditions are
assumed to be arithmetic so there's no need to have different numeric
and string comparison operators.

I've actually never seen an implementation of $(( ... )) that supported
-gt etc.  Bash, for example, gives a syntax error.  Are you sure that
patch does what you want?




More information about the busybox mailing list