tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ Force use of sh

ftp - mkdir using environment variables ▻

Force use of sh

In article <7so7uf$gf0$1@nntp6.u.washington.edu>,
Donn Cave  <donn@u.washington.edu> wrote:
>The two quirks (in my opinion) it introduced:
>1. All variables go into the environment.

I'm considering a fix for this in rc-2.0.

>2. Vector products, whatever they call it, where the juxtaposition of
>   two arrays  (a b c)(x y z)  evaluates to (ax by cz).  It's an
>   interesting feature, and although it's hard for me to find any
>   practical use for it, that wouldn't be a problem if it were done
>   only as called for explicitly (with "^").

I also have a plan to make free carets optional, but you don't get a
free caret in a literal `(a b c)(x y z)'.

If you're using rc, and are interested in discussing these developments,
you should be on the rc list: <rc-request@hawkwind.utcs.utoronto.ca>.

>usually more important, in my opinion, is the streamlined conceptual
>approach and the uncluttered notation.

To give one example, rc has exactly one form of quoting.  By comparison,
sh has at least 3, and languages like Perl even more.  A concatenation
operator, `^', makes sh-like double quotes and backwhacks unnecessary.

    ; foo = bar
    ; printf %s\n $foo
    bar
    ; printf %s\n '$foo is ' ^ $foo
    $foo is bar
    ; printf %s\n 'He said, "what''s the plan?"'
    He said, "what's the plan?"
    ; printf %s\n '$foo is `' ^ $foo ^ ''''
    $foo is `bar'

I find all this less surprising, and much easier to remember accurately,
than the quoting rules of any other shell.

Tim.
--
Tim Goodwin   | "[ `static' ] is so overloaded in the C/C++ world that
Leicester, UK | I try to avoid it whenever I can't." -- Larry Wall

Original headers:

From: tjg@star.le.ac.uk (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: Force use of sh
Date: 28 Sep 1999 11:23:55 +0100
Organization: University of Leicester, UK
Message-ID: <7sq50h$tbc$1@ltpcg.star.le.ac.uk>
References: <7so2m2$fjc@dfw-ixnews6.ix.netcom.com>
  <7sef4d$8g0$1@nntp6.u.washington.edu> <7snmbq$f2a$1@ltpcg.star.le.ac.uk>
  <7so7uf$gf0$1@nntp6.u.washington.edu>

△ comp.unix.shell △

◅ Force use of sh

ftp - mkdir using environment variables ▻