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: f6134,47a06d19e281eb8d X-Google-Attributes: gidf6134,public X-Google-Thread: 1164f8,47a06d19e281eb8d X-Google-Attributes: gid1164f8,public X-Google-Thread: 111731,47a06d19e281eb8d X-Google-Attributes: gid111731,public X-Google-ArrivalTime: 1994-03-12 13:31:50 PST Xref: gmd.de comp.org.decus:3026 comp.os.vms:42433 comp.sys.dec:14365 comp.unix.advocacy:1196 Path: gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!emory!news-feed-1.peachnet.edu!concert!ais.com!bruce From: bruce@ais.com (Bruce C. Wright) Newsgroups: comp.org.decus,comp.os.vms,comp.sys.dec,comp.unix.advocacy Subject: Re: Is VMS Dying? Message-ID: <1994Mar12.213150.6541@ais.com> Date: 12 Mar 94 21:31:50 GMT References: <1994Feb26.204059.4068@mixcom.mixcom.com>< Distribution: world Organization: Applied Information Systems, Chapel Hill, NC In article , rockwell@nova.umd.edu (Raul Deluth Miller) writes: > Carl J Lydick: > Using the Unix approach to wild-carding ... also means that you > can't give two wild-card arguments in a single command. If you > want to do either of the above, you've got to pass the wildcard > itself, and not the expansion of the wildcard, to the program, or > have the program read the list of file names from a file instead of > taking the filespecs as an argument. > > Or, have the shell do it for you: > $ for x in *.[ch]; do cp $x ${x}_backup; done > > Since unix allows you to use arbitrary commands in place of wild > cards, you wind up with a lot more flexibility this way than you do > with VMS's scheme. Izzat so? VMS does have a similar capability built into DCL: $ old_name = "" $ loop: x = f$search (p1) $ if x .eqs. old_name .or. x .eqs. "" then exit $ old_name = x $ copy 'x' 'f$extract(0,f$locate(";",x),x)'_backup $ goto loop Granted, the syntax is a little ugly; it is notably less ugly if you don't require appending the "_backup" string onto the file name but instead want to copy the files into, eg, a backup directory. I seriously doubt that there is anything very useful of this sort that you can't do on both systems, after some fashion. Each of them will have some situations that are more awkward for that system than it is for the other one (example: it is often rather more awkward to arrange a script in Unix that does wild-carding on non-file objects than it usually is on VMS), but if you're willing to spend the time to figure out how each of them works you should be able to find a way to accomplish the task on both of them. Bruce C. Wright