Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!zephyr.ens.tek.com!tektronix!sequent!cseaman From: cseaman@sequent.UUCP (Chris "I'm Outta Here, Man!" Seaman) Newsgroups: comp.sys.amiga.tech Subject: Regular expressions vs. file name generation (Was: Re: Pipes) Message-ID: <36467@sequent.UUCP> Date: 8 Jun 90 23:38:49 GMT References: <2533@zipeecs.umich.edu> <136735@sun.Eng.Sun.COM> <12391@cbmvax.commodore.com> Organization: Sequent Computer Systems, Beaverton, OR Lines: 32 daveh@cbmvax.commodore.com (Dave Haynie) writes: < As pointed out many times here before, the Amiga regular expression language < is far more powerful than the other models available at the time. Now you're < really the one talking syntactic sugar. Sure, "*" could be substituted for < "#?", but what do you substitute for FILE#(A|B|C#E??).(C|O), or a similar ^^^^^^^^^^^^^^^^^^^^^^ < AmigaDOS pattern? The only thing that comes close is the grep language, < which isn't used for file naming, but that has the disadvantage of using a < number of common file characters, such as ".", as part of its regular < expression language. I would be annoyed if I had to type "more thing\.c"... While I don't want to sound critical (I LIKE the regular expression syntax on the Amiga!), I feel that SOME of the more intelligent UNIX shells have been slightly slighted (?). Although the Bourne shell could not match the power of the above statement, csh and ksh can. I would implement it in csh as follows: ls file{[ab],c{e*,}??}.[co] and in ksh: ls file*([ab]|c*(e)??).[co] These may be somewhat more cryptic than the Amiga equivalent, but they are possible (I just tried both, and both retrieved the expected file names). -- Chris (Insert phrase here) Seaman | ___-/^\-___ cseaman@sequent | //__--\O/--__\\ nI' yIyIn 'ej yIchep. ...!uunet!sequent!cseaman | // \\ The Home of the Killer Smiley | `\ /'