Path: utzoo!mnetor!tmsoft!torsqnt!hybrid!scifi!bywater!uunet!cbmvax!jesup From: jesup@cbmvax.commodore.com (Randell Jesup) Newsgroups: comp.sys.amiga.programmer Subject: Re: AmigaDOS patterns with '~' Message-ID: <18132@cbmvax.commodore.com> Date: 26 Jan 91 06:45:57 GMT References: <04348.AA04348@ami-cg.UUCP> <17879@cbmvax.commodore.com> Reply-To: jesup@cbmvax.commodore.com (Randell Jesup) Organization: Commodore, West Chester, PA Lines: 40 In article rosenber@ra.abo.fi (Robin Rosenberg INF) writes: > >While on the subject; How do I delete files that end with a '~', mg3 >and gnuemacs creates backup files ending with a tilde. Under 2.02 i could use >delete #?[~] and it did the job. Under 2.03 it deletes all files (thanks). Here we go again. Currently we have not released anything called 2.03 (last time it was 2.04 someone was reporting things from). We may do so, and developers may (or may not) have what will be called 2.03 if and when it is released. (How's that for not saying much with a lot of words? ;-) For beta versions, we refer to them by the version numbers, as reported by "version" or the version menu item in WB. There was supposed to be a specific hack in the patternmatch code to do something special with a final ~. Certainly it shouldn't silently eat it (VERY bad). I'll look into it; in the meantime you can use "delete #?'~" (tick (') makes the next wildcard non-special). Try it in a test directory first, though, just for safety. BTW, bugs like this are one of the reasons why we don't want non- developers playing with betatest kickstarts. >Q2: Is it possible to delete files that match a pattern except for the >files that match another pattern (with the delete command)? I think you have to "merge" the patterns. example: #?.c but not adsf.c -> ~(asdf).c ab#?.c but not ab#c.c -> ab~(#c).c Trying to do tricky things with patterns can be mind-warping (much like with Unix RE's). -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.commodore.com BIX: rjesup The compiler runs Like a swift-flowing river I wait in silence. (From "The Zen of Programming") ;-)