Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!rpi!pawl.rpi.edu!deven From: deven@pawl.rpi.edu (Deven Corzine) Newsgroups: comp.sys.amiga Subject: Re: Wild Cards, file syntax (was: arp CD command change???) Message-ID: Date: 23 Feb 89 02:06:28 GMT References: <8902131846.AA21527@postgres.Berkeley.EDU> <35960@bbn.COM> <5985@cbmvax.UUCP> <6051@cbmvax.UUCP> Sender: usenet@rpi.edu Reply-To: shadow@pawl.rpi.edu (Deven Thomas Corzine) Organization: RPI Public Access Workstation Lab, Troy, NY Lines: 123 In-reply-to: jesup@cbmvax.UUCP's message of 22 Feb 89 19:36:19 GMT Distribution: In article <6051@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes: In article deven@pawl.rpi.edu (Deven Corzine) writes: >I don't like / >for the parent directory. It's just weird. But that's preference, as >well. Matt Dillon argues that "/" is much easier to type for parent >directory. That may be, but going back more than one directory is >fairly uncommon in my experience, and I'd rather use "../file" than "/file" >to refer to a file in the parent directory. It is clearer and less >prone to error. (Accidental keybounce on the /, etc...) I often have to look and count ../'s to figure out how many levels I've gone up (I often need multiple ../'s). Personal preference, what you were raised on. True, it's mostly a matter of preference, but "." and ".." _seem_ more consistent, somehow. Regardless, seeing as how it's a matter of preference, and the is by no means a clear concensus, both styles ought to be supported. People seem about evenly split between Unix and AmigaDOS style conventions. Therefore, support both. No big problem. (Have an environment variable or equivalent to define which to use.) > >$There is no easy equivilent for "./file" under AmigaDOS... > > > >This is surely rather unimportant as the current directory is usually > >searched FIRST anyway. > >Unimportant, hell. *Maybe* I don't WANT to have the current directory >searched first. Unix: ./file AmigaDos: file Easy equivalent. Ghod. In one ear and out the other. You have missed the point entirely, just like everyone else saying "just use 'file' instead of './file' - they're the same!" They *NOT* equivalent!!! They are similar, and in many situations they are equivalent, but NOT in all situations. The most important example, which I have pointed out 3 or 4 times already, is in the case of path and resident list searching. In THAT case, "file" and "./file" are NOT equivalent. "file" is a basename. "./file" is a pathname. ONLY basenames should EVER be searched for in paths or resident lists. If you type "./ls" at a command prompt, what that says is "run THIS 'ls' program." No shell should ignore that very specific request by saying, "No, no. You want to run THIS one. See, it's resident - it's faster, so you MUST want to run this one!" Merely because a program has the same name as one which is resident does NOT mean they must be the same program. Such logic is absolutely inane. It might be a newer version, a test version, or a different program altogether. If the user specifically says "THIS "file" and no other" by using "./file", no shell or program should second-guess the user and ignore it. If, on the other hand, the user merely says "run 'ls'" by typing "ls", then the shell is quite within its rights to give precedence to a resident version rather than one in the current directory, as the request is ambiguous, and more likely than not, the resident one is the one the user desires to be run. If it is not, the user can explicitly override it with "./ls". Similarly, if the user says "c:dir", the shell should never run a "dir" in the resident list, OR a "dir" in the current directory. "c:dir" is very specific, and searching elsewhere should not be done. (In any of the above, replace "shell" with "CLI" if it suits you to do so. Or "AmigaShell". It applies equally.) THAT is why "./file" is NOT equivalent to "file". Unix AmigaDOS ---- -------- file file ./file -- "" "" . -- .. / / : There are NOT equivalents for all of them. There is no equivalent for "./file" - "file" is an equivalent for "file" (duh) but not for "./file". Similarly, "" is a equivalent for "", NOT for ".". There is no equivalent for ".". You can use "" for current directory in Unix. And it is perfectly equivalent to "" under AmigaDOS. But people use "." instead of "" under Unix because it is one less character to type, and it is more predictable. AmigaDOS's "" is NOT equivalent to Unix's ".", no matter how you might try to make it appear to be so. Essentially the concept of "." as current directory is completely unsupported under AmigaDOS at present. The concept of ".." is supported; merely the form differs. Concerning wildcards, the amiga wildcards are fairly versatile: '#', '?' and (...|...|...) can be very useful (yes, I know about {..,...}). I agree * is more convenient than #?, but the use of * as an escape is a holdover from the BCPL/TriPos heritage of AmigaDos (like \ is a holdover in unix shells from C). I don't argue that the AmigaDOS wildcards, WHEN SUPPORTED, are fairly versatile. They certainly are. But, #? as a "match-everything" wildcard is atrocious and entirely counter-intuitive. Sure, it's understandable given "# is for any number, and ? is for any character, so #? is for any number of any characters..." But it is NOT something that an AmigaDOS novice would EVER be likely to guess. It took me about a month to find out that #? was the brain-damaged wildcard, instead of a simple and obvious "*". I was an AmigaDOS novice, but by NO means a computer novice. I had used many other systems before, and had much experience with other operating systems, and regexp usage elsewhere. At the very least, SOME character - ANY character - should have been provided as a single-character equivalent for #?. It would not have been difficult to program, and would simplify things for people. "*" is by far the best choice, but using "&" or "@" or "~" or SOMETHING would be better than nothing. But, it's a bit late now. *sigh* (By the way, I spent hours searching the manuals that came with the A500 - they talked too much about the Workbench interface, and far too little about the CLI. There was no reference in ANY index to the wildcards available, and was mentioned ONCE in an obscure place, as I recall.) -- Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup (the From: line is wrong. mailing address is shadow@pawl.rpi.edu, not deven@pawl.rpi.edu.) -- ------- shadow@pawl.rpi.edu ------- Deven Thomas Corzine --------------------- Cogito shadow@acm.rpi.edu 2346 15th Street Pi-Rho America ergo userfxb6@rpitsmts.bitnet Troy, NY 12180-2306 (518) 272-5847 sum... In the immortal words of Socrates: "I drank what?" ...I think.