Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site laidbak.UUCP Path: utzoo!linus!decvax!harpo!eagle!mhuxt!mhuxi!cbosgd!ihnp4!laidbak!mark From: mark@laidbak.UUCP Newsgroups: net.unix-wizards Subject: Re: filename hoopla Message-ID: <156@laidbak.UUCP> Date: Fri, 5-Aug-83 03:24:10 EDT Article-I.D.: laidbak.156 Posted: Fri Aug 5 03:24:10 1983 Date-Received: Sat, 6-Aug-83 08:10:05 EDT References: <941@rlgvax.UUCP> Organization: LAI, Westmont, IL Lines: 39 The Bourne shell mangles names with eight-bit characters by stripping high-order bits. This is why "rm -i *" doesn't always work on garbage filenames. Perhaps this (or the fact that ASCII is a seven-bit code) is why USG disallows filenames containing eight-bit characters. Assuming that only printable characters were allowed within filenames, what about those characters which are special to the shell? For example, I once created a file named "*". Imagine the consequences of a naive user's attempts at removing this from a directory full of important files. What about a dash ("-") at the beginning of a name? Just try to manipulate (or remove) that with a program which recognizes options! Also, let's not forget that the shell is just another user-level process (as witnessed by users of csh, vsh, ...), and that each new shell defines several additional special characters (such as "~" in csh). Numerics are another special case. There are already several programs (mkfs, icheck, dcheck and ncheck come to mind immediately) which distinguish arguments from filenames by recognizing numeric characters. Even such accepted punctuation as "_" and "." would have to go, since a future shell might easily adopt them as special characters (don't laugh; the designers of uucp's "...!..." syntax and the "C" shell's history mechanism obviously weren't thinking of each other). Personally, I dislike the idea of protecting users from themselves. The only way to "cover all of the bases" would be to restrict qualifiers to beginning with an alphabetic characters and containing nothing but alpha- numerics. Many people would certainly find this solution unacceptable. A proper solution probably lies in the tty handler, which now prevents users from seeing things as they are. We must be wary of programs which send escape sequences to terminals, as these frequenly contain unprintable characters (beyond the escape itself). At least here we are dealing with a single problem, rather than the untold number associated with filename restrictions. Mark Brukhartz ..!{ihnp4,allegra,trsvax}!laidbak!mark