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: 1164f8,47a06d19e281eb8d X-Google-Attributes: gid1164f8,public X-Google-Thread: f6134,47a06d19e281eb8d X-Google-Attributes: gidf6134,public X-Google-Thread: 111731,47a06d19e281eb8d X-Google-Attributes: gid111731,public X-Google-ArrivalTime: 1994-03-09 03:17:20 PST Xref: gmd.de comp.org.decus:2803 comp.os.vms:41863 comp.sys.dec:14036 comp.unix.advocacy:950 Path: gmd.de!newsserver.jvnc.net!yale.edu!yale!gumby!newsxfer.itd.umich.edu!gatech!europa.eng.gtefsd.com!news.umbc.edu!haven.umd.edu!nova.umd.edu!nova!rockwell From: rockwell@nova.umd.edu (Raul Deluth Miller) Newsgroups: comp.org.decus,comp.os.vms,comp.sys.dec,comp.unix.advocacy Subject: Re: Is VMS Dying? Followup-To: comp.org.decus,comp.os.vms,comp.sys.dec,comp.unix.advocacy Date: 9 Mar 1994 06:17:20 -0500 Organization: University of Maryland University College Distribution: world Message-ID: References: <1994Feb26.204059.4068@mixcom.mixcom.com> <1994Mar5.163931.18758@avatar.montagar.com> <1994Mar8.130836.18775@avatar.montagar.com> NNTP-Posting-Host: nova.umd.edu In-reply-to: davidc@avatar.montagar.com's message of 8 Mar 94 13:08:36 CDT David L. Cathey: . > . For example: grep takes one search key followed by a list . > . of file names. Why not multiple search keys? Raul Deluth Miller: . > egrep 'key1|key2|key3' files David L. Cathey: . Darn... I wanted to search for |'s but now the syntax is going to . get strange, I bet... But that's okay, since it's alright for Unix . to do that, but DCL must still be broken when it get's strange with . "s... Huh? There's a batch of different quoting characters under shell/egrep: '' quote everything between these. "" quote everything between these, but do variable substitutions. \ quote the next character. [] this is a set of characters. The only "confusing" issue is that both the shell and egrep deal with meta-character handling. In my above example, I've assumed that meta-character handling is enabled in the shell. If you turn it off in the shell, you search for a single key with | in it. The only reason this is "confusing" is that you have so many options to pick from. This is balanced by the fact that these options let you do a wide variety of things [in this case, you are allowed to look for a wide variety of patterns]. Most of the time, people just want to look for alphanumeric keys -- and the options may be ignored. Also, note that the above syntax works with files-in-a-file-system, as well as with disk and tape devices and executables and so on. This might also be considered confusing -- it allows you a lot of options that you might not wish to excercise at any particular instance. Most of the time, people have these things organized in a reasonable directory structure -- and the options may be ignored. . Notice that because of the interaction of the shell, the search key . must be quoted to be within one argument. Also, what if you want . to arrange the aruments differently? Given your average shell, you . are constrained in your design of your command line. What are you asking here? How does "arranging the arguments differently" accomplish any purpose? Raul D. Miller