Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: peter@abbnm.com (Peter da Silva)
Subject: Re: Unexpected result from grep
Date: Thu, 25 Dec 2003 22:15:21 +0000 (UTC)	[thread overview]
Message-ID: <bsfnhp$24ra$1@jeeves.eng.abbnm.com> (raw)
In-Reply-To: slrnbujgei.ab.stephane.chazelas@spam.is.invalid

In article <slrnbujgei.ab.stephane.chazelas@spam.is.invalid>,
Stephane CHAZELAS  <this.address@is.invalid> wrote:
> RESULT=`"$COMMAND" -E "$1" "$2" 2>/dev/null`

> The outer quotes are not necessary here.

Right you are, that's what I get for not testing what I was posting, and
depending on "I know this works, now let's make sure I'm doing it right"
instead of "I know this works, and... I think this is it".

> The `...` command substitution is a portability nightmare,

Anything that requires more than two levels of quoting is a problem, and a sign
that maybe you need to rethink doing this in the shell.

> See info -f autoconf -n 'Portable Shell'

Autoconf is one of those programs that's pushing the shell far beyond the
limits of sanity. Using autoconf is a sign that your program is getting to
be a bit of a portability challenge and it's time to consider rewriting that
code with all the #ifdefs and odd macros in system calls.

Like I said elsewhere... I'm not talking about what you need to do to make
multi-hundred-line masterpieces portable, just that 90% of all scripts don't
get anywhere near the bleeding edge and don't need anything more than /bin/sh.

-- 
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`


      reply	other threads:[~2003-12-25 22:15 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-11 16:13 Unexpected result from grep Dan
2003-12-11 16:32 ` Jens Schweikhardt
2003-12-11 16:37 ` Chris F.A. Johnson
2003-12-11 16:47 ` Stephane CHAZELAS
2003-12-11 18:24   ` Joseph Dionne
2003-12-12 13:19     ` Dan
2003-12-19 20:11     ` Peter da Silva
2003-12-20 16:13       ` Dan Mercer
2003-12-22 21:14         ` Peter da Silva
2003-12-23 16:01           ` Dan Mercer
2003-12-23 21:01             ` Peter da Silva
2003-12-23 22:15               ` Dan Mercer
2003-12-25 22:29                 ` Peter da Silva
2003-12-24 16:41       ` Stephane CHAZELAS
2003-12-25 22:15         ` Peter da Silva [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox