Subject: Re: [vserver] [PATCH] support for busybox grep and busybox shell
From: "Daniel Hokka Zakrisson" <daniel@hozac.com>
Date: Fri, 3 Aug 2007 16:04:04 +0200 (CEST)

Natanael Copa wrote:
> <snip>
>> I like the bashisms. They mean we get a defined working environment, so
>> shells different interpretations of POSIX or whatever don't affect us...
>
> well.. I'm trying to make a minimal vserver host. Now look at this:
>
> nc ~ # ls -l /bin/bash /bin/busybox
> -rwxr-xr-x 1 root root 713696 Aug  3 06:13 /bin/bash
> -rwxr-xr-x 1 root root 778696 Aug  1 17:41 /bin/busybox
>
> busybox ash is almost compatible with bash. Has cmdline completion and
> lots other nice things. Basicly it misses arrays. But in addition to the
> shell it also provides thees tools:

No arrays is a deal-breaker. We rely heavily on them, for good reason.
There's no clean way to use a single variable and be able to separate
different words that may contain spaces. (No, encasing them all in quotes
and using eval is not clean.)

>> That said, I'm not entirely opposed to the idea, given that POSIX-sh
>> doesn't make the scripts more complicated or harder to read...
>
> I don't think it will be harder to read. Maybe even easier. I could make
> a sample for you when i get time. I suspect it will require some work.

Without arrays, there's no point. We need them.

>> > Natanael Copa
>>
>> The grep patch looks sane, thanks.

-- 
Daniel Hokka Zakrisson