Re: Unexpected result from grep

From: Dan Mercer (dmercer_at_mn.rr.com)
Date: 12/23/03

  • Next message: Stephane CHAZELAS: "Re: Unexpected result from grep"
    Date: Tue, 23 Dec 2003 16:15:04 -0600
    
    

    "Peter da Silva" <peter@abbnm.com> wrote in message news:bsaafu$kl5$1@jeeves.eng.abbnm.com...
    : In article <NFZFb.159619$Vu6.57918@twister.rdc-kc.rr.com>,
    : Dan Mercer <dmercer@mn.rr.com> wrote:
    : > But it severely lessens the need to invoke awk or sed, etc. Because of
    : > extended globbing, and the new parameter substitution forms, there is
    : > no need to invoke awk for trivial purposes, as so often was done in the
    : > past. The less you need external programs, the less you need to
    : > worry about their portability.
    :
    : You just need to worry about whether the shell you're using is there or
    : not. Me, I'd worry about whether I should be using the shell at all.
    :
    : Look, we didn't start out this side-thread with any multi-hundred-
    : line script that was longer than many compiled programs, but about
    : what comes down to about four lines of portable code that didn't use
    : any gawkisms.
    :
    : I'm not talking about vast constructs that are pushing the envelope of
    : shell scripts. I'm talking about install scripts for programs, things
    : that typically distill down to a few dozen lines at the most, don't
    : stretch even the most ancient utilities, and seem to be written in
    : extended shell dialects purely out of habit. I'm talking, well, about
    : those habits.
    :
    : If you really need more than sh, if you're going to make me install
    : another program to get your code to work, then I don't suppose ksh is
    : as big a deal as Perl.
    :
    : Except that there's not three highly incompatible versions of Perl in
    : current use, and Perl is more likely to be there anyway.

    Well, pieces of it are. Perl is a step above a shell and a step below
    writing a program. I've used systems where Perl wouldn't even
    load in a timely fashion, others where Perl 4 was supplied.
    Perl has also been described as having a "write-only" syntax.
    Most people can puzzle out even a complicated shell script and also
    have trouble with even a simple perl script.

    As for writing programs, the whole idea of portability means being
    able to operate on different architectures. There are all sorts of
    activities for which neither perl nor a program is suitable -
    starting and stopping programs at run time, system backups,
    canned database queries, etc.

    Dan mercer
    :
    : I haven't addressed the pseudo-problem of "echo", and I'm not going to.
    : Nor do I think I'll get into one of those point-by- point cross-griping
    : exchanges, much as it tempts me.
    :
    : I do wonder why you think POSIX should have picked zsh, though, since you
    : seem to prefer ksh and it sure seems like a better shell to me.

    Because AT&T is stupid and doesn't know how to make money. They create
    things like UNIX and ksh then overburden them with restrictive licenses
    that make them difficult to adapt universally. So, considering the combination
    of functionality closer to ksh than pdksh and a less restrictive license, zsh
    would have been preferable to the Babel of shells united only by a weak
    standard that we have now.

    :
    : --
    : I've seen things you people can't imagine. Chimneysweeps on fire over the roofs
    : of London. I've watched kite-strings glitter in the sun at Hyde Park Gate. All
    : these things will be lost in time, like chalk-paintings in the rain. `-_-'
    : Time for your nap. | Peter da Silva | Har du kramat din varg, idag? 'U`


  • Next message: Stephane CHAZELAS: "Re: Unexpected result from grep"

    Relevant Pages

    • Re: [Long] about ksh93 (Was: Bourne Shell Programming on Windows)
      ... :>: Are you saying that David Korn is an unitiated or ignorant ksh ... :> won't be called in a script. ... :> in every shell. ... that should be teached in every shell programming book. ...
      (comp.unix.shell)
    • Re: Setting environment variables from a Perl script
      ... >> that, once you exit your shell and restart it, the changes made by the ... >> Perl script are no longer there), but there are times when a user ... times these programs required that certain environment variables were ...
      (comp.lang.perl.misc)
    • Re: Unexpected result from grep
      ... I'd worry about whether I should be using the shell at all. ... as big a deal as Perl. ... Most people can puzzle out even a complicated shell script and also ... seem to prefer ksh and it sure seems like a better shell to me. ...
      (comp.unix.shell)
    • Re: Another version of cleanfile/cleanpatch
      ... Because your shell script is unreadable by normal human beings ... while the perl script for people with a bit of perl fu can read it ...
      (Linux-Kernel)
    • Re: Secure issues on the usage of exec
      ... I would not set a trap on SIGINT in a script? ... That's the same with any other command than sleep. ... :>: either but at least are much more usable as a shell). ... :>: have tcl, perl, python, ruby as programming languages. ...
      (comp.unix.shell)