Re: (patch for Bash) arrayzip, arrayunzip
From: William Park (opengeometry_at_yahoo.ca)
Date: 10/21/04
- Next message: Chris F.A. Johnson: "Re: (patch for Bash) arrayzip, arrayunzip"
- Previous message: Bruce Barnett: "Re: csh question: foreach"
- In reply to: Kenny McCormack: "Re: (patch for Bash) arrayzip, arrayunzip"
- Next in thread: Chris F.A. Johnson: "Re: (patch for Bash) arrayzip, arrayunzip"
- Reply: Chris F.A. Johnson: "Re: (patch for Bash) arrayzip, arrayunzip"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 21 Oct 2004 00:49:48 GMT
Kenny McCormack <gazelle@yin.interaccess.com> wrote:
> In article <slrncnch8p.2ec.stephane.chazelas@spam.is.invalid>,
> Stephane CHAZELAS <this.address@is.invalid> wrote: ...
> >> - double and triple quoting give me headache.
> >
> >Then use intermediate variables/functions, or use a real programming
> >language.
>
> He did. I think most of us here would consider "C" to be a "real
> programming language".
>
> The point is that it looks like William is taking the view that it is
> just as easy to add features via writing C code as it is to do it
> writing shell code. And the thing is, once you get in the groove of
> writing stuff in C, it can be just as easy as writing in a script
> language.
>
> The only problem with all this is that it is O/T in a shell
> programming group.
I think it's very relevant, because it allows comparison and learning.
Although 'arrayzip' and 'arrayunzip' are much easier in C (I don't see
how anyone could recommend Stephane's code over mine), you do have point
on strcat(3) and strcpy(3) emulation I wrote. There, pure shell
functions are only 5 times slower than C versions, which is pretty good
considering that it's shell script vs. C.
For reference, the strcat(), strcpy(), strlen(), strcmp() functions can
be found at
http://home.eol.ca/~parkw/index.html#string
-- William Park <opengeometry@yahoo.ca> Open Geometry Consulting, Toronto, Canada
- Next message: Chris F.A. Johnson: "Re: (patch for Bash) arrayzip, arrayunzip"
- Previous message: Bruce Barnett: "Re: csh question: foreach"
- In reply to: Kenny McCormack: "Re: (patch for Bash) arrayzip, arrayunzip"
- Next in thread: Chris F.A. Johnson: "Re: (patch for Bash) arrayzip, arrayunzip"
- Reply: Chris F.A. Johnson: "Re: (patch for Bash) arrayzip, arrayunzip"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|