Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!wuarchive!uwm.edu!src.honeywell.com!msi.umn.edu!cs.umn.edu!atc!s5000!nightowl!hawkmoon!det From: det@hawkmoon.MN.ORG (Derek E. Terveer) Newsgroups: comp.arch Subject: Re: UNIX mind-set (was: How wrong is MS-DOS?) Message-ID: <1991Jan15.105015.1581@hawkmoon.MN.ORG> Date: 15 Jan 91 10:50:15 GMT References: <8148@hub.ucsb.edu> <11313@lanl.gov> <8166@hub.ucsb.edu> <5339@idunno.Princeton.EDU> Organization: Home System (One of the Eternal Champions); Eagan, MN, 55123-2507, USA Lines: 15 pfalstad@phoenix.Princeton.EDU (Paul John Falstad) writes: >Even if you turned on globbing for the "ls x*y" and turned it off for >"ls | grep x*y", this would still be wrong, since the regular expression >"x*y" does not do the same as the shell pattern "x*y". The latter >matches filenames starting in x and ending in y, while the former matches >filenames containing a string consisting of an arbitrary number of x's >followed by a y. Except that because x*y was not quoted, the shell would expand the pattern before grep saw it. Grep's actions would depend on what x*y expanded to. -- Derek "Tigger" Terveer det@hawkmoon.MN.ORG - MNFHA, NCS - UMN Women's Lax, MWD I am the way and the truth and the light, I know all the answers; don't need your advice. -- "I am the way and the truth and the light" -- The Legendary Pink Dots