[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: /usr/bin/[ what is it?



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Matus UHLAR - fantomas wrote:
> From: John Hasler <jhasler@debian.org>
[snip]
> On 10.08.06 12:05, John Hasler wrote:
>> Ls doesn't do globbing.  The shell does.
> 
> Exactly. Unlike DOS, in UNIX it's up to shell to expand filenames
>  for programs, so programs only get list of files and they don't 
> have to care about things like filename expansion.

Problems with shell expansion:
1. If your glob expands very large, the command buffer will
   overflow.
2. You can only pass wild-carded filenames.
3. You've got to escape re characters

> (yes, some do)
> 
> in old DOS programs, programs had to expand filenames themselves 

And OpenVMS, and probably all the other non-Unix minicomputer OSs.

> (in a very ineffective way)

I've always found "programmatic expansion" to be very easy and
effective to implement.

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFE3Ln2S9HxQb37XmcRAmjTAJ4jSTzeJF7G4QjaLabXwYwmvyofzwCgzyqV
3zjs+cXOgb2LNoqRCGRDgjQ=
=z2fe
-----END PGP SIGNATURE-----



Reply to: