Newsgroups: comp.os.misc
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!ficc!peter
From: peter@ficc.ferranti.com (Peter da Silva)
Subject: Re: Globbing
Message-ID: <A23AFH9@xds13.ferranti.com>
Reply-To: peter@ficc.ferranti.com (Peter da Silva)
Organization: Xenix Support, FICC
References: <17602@lanl.gov> <WG0A148@xds13.ferranti.com> <18205@lanl.gov>
Date: Mon, 18 Mar 91 21:58:11 GMT

In article <18205@lanl.gov> jlg@cochiti.lanl.gov (Jim Giles) writes:
> > And when I'm calling it directly from another program (say, "mail") I
> > have to add a bunch of quoting I'm not putting in now... [...]

> Only in the _rare_ case when the arguments contain wildcard characters
> that you don't want expanded.

No, this is the common case, when you're passing a string to a program
that you got from somewhere else. You *have* to assume that it might be
expanded. It is a bug to do anything else.

> Your "solution" doesn't - it requires multiple quoting,
> perhaps to several levels if the argument is to be passed through
> several programs.

No, it requires assuming that the people who wrote the programs put in
the appropriate escapes. If they didn't, it's a bug.

> Exactly what I just said: DON'T quote multiply - quote once and for
> all!!

And that means, you quote in the shell.

> Quoting should mean what people intuitively think it means:
> the quoted argument will be used literally.  No matter how many levels
> deep it's passed and no matter where it goes, the end use of the string
> will use the exact literal contents of the string.

I see, so if you're writing a Fortran program you shouldn't have to quote
the file name in the following statement:

	OPEN(NAME='JGTEST.TXT',TYPE=UNKNOWN)

???

> And consistent syntax is achieved by programmer discipline, not
> monstrous shell design.

Why should the shell be different from any other programming language?

> fact the UNIX contains _MORE_ than its share of features which are
> inconsistent is evidence that it is not _really_ considered to be an
> important issue.  So, you're just clutching at any argument which will
> defend your religiously chosen system.

Ah, abuse.

No, my religiously chosen system is AmigaDOS. Which does the expansion in
the programs...
-- 
Peter da Silva.  `-_-'  peter@ferranti.com
+1 713 274 5180.  'U`  "Have you hugged your wolf today?"
