From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f7344,47a06d19e281eb8d X-Google-Attributes: gidf7344,public X-Google-Thread: 111731,47a06d19e281eb8d X-Google-Attributes: gid111731,public X-Google-Thread: f6134,47a06d19e281eb8d X-Google-Attributes: gidf6134,public X-Google-Thread: 1164f8,47a06d19e281eb8d X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-03-15 12:01:40 PST Xref: gmd.de comp.org.decus:3043 comp.os.vms:42520 comp.sys.dec:14412 comp.unix.advocacy:1227 Path: gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!news.uoregon.edu!netnews.nwnet.net!news.u.washington.edu!seymour From: seymour@u.washington.edu (Richard Seymour) Newsgroups: comp.org.decus,comp.os.vms,comp.sys.dec,comp.unix.advocacy Subject: Re: Is VMS Dying? Date: 15 Mar 1994 20:01:40 GMT Organization: University of Washington, Seattle Message-ID: <2m5474$128@news.u.washington.edu> References: <1994Mar2.140017.18730@avatar.montagar.com> <2ldt8v$3hu@network.ucsd.edu> <2leee2$7op@gap.cco.caltech.edu> NNTP-Posting-Host: stein.u.washington.edu In article , Raul Deluth Miller wrote: >>Carl J Lydick: >> % grep * file.name > >* isn't a valid search string for grep, even if it were quoted. * is >a meta character such that x* represents 0 or more occurences of x. x >may be a single character, a set of characters, a string, a set of >strings, or some other arbitrary regular expression. > >As far as I know, grep '*' files will just search for a literal > asterisk, but even that is rather bad form. In the context of the thread leading to Carl's example, he was showing that the shell may (i tested it with csh) perform helpful things like: Expand the wildcard to a space-separated list of your local filenames... then hand -that- to grep as the string to locate in every other file (in my test, a file named "8mm" became the string searched for in all other files...) (i assume it'll get around to file.name someday). A consequence of the shell blindly expanding wildcards to space-separated filenames, without knowing what the application -really- wanted. In VMS the application would ask the shell (DCL) for the "search_string", and then later for the "filename". DCL, using a user (or DEC-) supplied parsing table, would unambiguosly hand back the parts of the command line (along with flags indicating if there were comma-separated multiple parts to -that- portion of the argument list). In an attempt to see what SEARCH thought of "search file.name *", and other attempts to confuse it... the above ^^^ located asterisks in the named file. It also found "%" and "." (without quoting them). A comma confused DCL: and it confessed to that. DCL tried to use the comma as a separator between multiple filenames... and decided that there was no additional name beyond the comma. The result was that the application was -not- called, and DCL reported: %DCL-W-NULFIL, missing or invalid file specification - respecify (just for chuckles: HELP ERROR told me to use the form HELP/MESSAGE NULFIL, the text of which stated that DCL expected a file specification to follow a comma. So VMS told me in english what it -thought- was going on, which (hopefully) would allow me to adjust what i was trying to tell it. (HELP SEARCH, of course, actually said that i should surround non-alphanumerics in quotes (" "), but who reads HELP first?)) --dick