Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!oliveb!amiga!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga Subject: Re: AmigaDos vs Unix wildcards/pathnames Message-ID: <6368@cbmvax.UUCP> Date: 21 Mar 89 21:18:58 GMT References: <11241@ut-emx.UUCP> <6306@cbmvax.UUCP> <353@bnr-fos.UUCP> <6342@cbmvax.UUCP> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 77 In article <6342@cbmvax.UUCP> andy@cbmvax.UUCP (Andy Finkel) writes: >In article shadow@pawl.rpi.edu (Deven Thomas Corzine) writes: >>Oh, come on. Just how many users new to the amiga are EVER going to >>think of using "#?" for a wildcard?? '*' is VERY widely used and >>accepted, in Unix, MS-DOS and other operating systems. It was 3-4 Well, I can think of a major SF book published in the last year that used #? for "anything". This book didn't have much to do with computers at all, it was essentially an aside. Perhaps the writer is an Amiga user. >>Dreadful Unix syntax indeed. Unix is a relatively simple design, >>through and through. Unix is intended to be functional, simple, but >>powerful. And that it is. Unix is not intended to cater to users who > >Well, I actually got the impression that (at least under BSD systems) >there was a certain amount of evolution, and actual disagreements >over command syntax...the find command and the print spooler >somehow pop into my mind. Most Unixes I've seen tended to have a lot of historical cruft and varying syntax, depending on which command/institution/whatever wrote the command in question. Some are position-dependant in their parameters, others aren't, some require - for options, some don't, some specify strings with -xstring, others with -x string, some allow -abcdef, others want -a -b -c -d -e -f, etc, etc. I admit that once you have a bunch of EP on a Unix it all seems fairly straightforward, but it's easy to forget all the man-page reading, and snooping scripts, and manual reading, and learning tricks from wizards, and (gasp) reading source. >>So? Either the shell builds an incredibly long line and pulls the >>parameters from it to pass to the program, or you pass the program the >>command line directly (as the CLI does) and the program builds the >>same incredibly long line. Big lot of difference it makes. > >Actually, since my wildcards are implemented in the program, >via a shared library call, what I do is > >call 'compile pattern' with my expression, >then loop calling 'next match' until it tells me that >no more matches are available. The long line problem As andy says, if you do expansion as needed (call "get next matching file" you lose all the command-line-buffer size problems, get faster response, and makes it easier to deal multi-directory wildcards (ala VMS "..." wildcard - the Unix equivalent is `find` with a bunch of options - not easy for a beginning user to grok (or even an intermediate one), putting aside the command-length problems.) >>'`' in csh to delimit a string which is to be parsed, executed as a >>command (in a subshell), and its output to replace the `command` on >>the command line. An extremely powerful feature which AmigaDOS has >>nothing to compare to. > >The standard AmigaDOS CLI commands can get their arguments from >a pipe or a file, as well as from the command line. The primitives >are there. You can write a shell that does that. I did. Jay Ts did. (Jay wrote Tshell, a nice commercial unix-csh clone.) >! is rather overloaded character. I hate having to type all those >\ or slip into sh when I want to do a bunch of UUCP mailing. >The AmigaDOS IF statement allows you to use the NOT keyword to reverse >the sense of an expression. You are correct that history substitutions >are too complicated, though :-) I usually just bring back the line, >edit it, and hit return, rather than count arguments. And, I do >this from both AmigaDOS 1.3 Shell and Unix. I truely HATE the usage of ! in csh. It annoys me no end (ditto for escaping other special characters). I tried to exorcise as much of that as possible when I wrote my shell for the amiga. Sorry for extending this discussion. -- Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup