On Mon, Dec 14, 2009 at 11:49 AM, weakish <weak...@gmail.com> wrote:
> On Dec 6, 3:54 pm, ciprian.crac...@gmail.com (Ciprian Dorin, Craciun)
> wrote:
>
>>     Now I'm trying to contribute back to the community, and I've sent
>> an email to Tig Goodwin (at t...@star.le.ac.uk), which the mail server
>> rejected (it seems that the email is not valid any more).
>
> Have you tried this email to contact Tim Goodwin: i...@libra-aries-
> books.co.uk
>
> Currently I'm not aware of any mail-list/code-repository dedicated to
> rc shell.


    Thanks, I'll try to contact him at that address...

    Unfortunately after playing a little bit more with rc, and trying
it's syntax and semantics to the limit, I've also found other nasty
bugs (some of which I've fixed, other I was not able to do so)...

    So for the moment I'm back to Bash... (But I'm planning on
implementing an ASM like language and associated virtual machine, that
would allow UNIX "glue" programs to be written.)

    Ciprian.

~~~~

    By the way, what is the expected outcome of the following snippet
of code when the `-e` (exit on non-0 exit code) is on:

{ echo 1 ; false ; echo 2 } || echo 3

    Case a) it should print `1` and exit because the false in the
middle of the block just failed;
    Case b) it should print `1`, and then `2`, because `false` is
inside a block that is part of a `||` command;
    Case c) it should print `1`, and then `3`, because `false` has
stopped the evaluation of the block, and made the entire block exit
code be `1`.

    I would prefer case 1, (treat any non-zero exit command like an
abnormal exception in the script), but with the addition of a "block
return" construct that would allow me to exit only from the current
block, like (I'm calling the "block return" keyword "block_return"

    {
        mkdir ./downoads || block_return 1
        pushd ./downloads # exception could happen, but only in race conditions
        wget http://somesite.com/somefiles.tar || block_return 2
        tar -x ./somefiles.tar || block_return 3
        rm ./somefiles.tar # again it should normally just work
    } || echo "there was some error"^$status

Reply via email to