Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!cwruecmp!bammi From: bammi@cwruecmp.UUCP Newsgroups: comp.sys.atari.st Subject: Re: An interesting way to crash gulam shell Message-ID: <2143@cwruecmp.UUCP> Date: Sun, 7-Jun-87 20:40:44 EDT Article-I.D.: cwruecmp.2143 Posted: Sun Jun 7 20:40:44 1987 Date-Received: Fri, 12-Jun-87 01:14:28 EDT References: <505@myrias.UUCP> Reply-To: bammi@cwruecmp.UUCP (Jwahar R. Bammi) Organization: Case Western Reserve University Lines: 36 Keywords: command line interpreter, shell In article <505@myrias.UUCP> mj@myrias.UUCP (Michal Jaegermann) writes: ............... >mkdir testd >mkdir testd\expmd >ls -l >testd\dirf # this for better effect >cp testd\* testd\expmd > >Now lean back and watch effects. There is nothing, short of resetting >your computer, that you can do anyway. (It will create a recursive >structure of subdirectories which you cannot remove, since rm command >does not have either -r or -f option. GEM will also barf on you after >a short while, coming with nonsense error messages). > I believe that this bug is closely related to 'rm *', mentioned by >John Turner. > From my perspective the answer is Yes and No. Let me try and explain. In Gulam the filename regular expressions are UNIX style filename regular expressions and NOT Gemdos style regular expressions. So a '*' matches all files in $cwd. Therefore 'whatever *' will also match the names of all subdirectories in $cwd. In newer versions of Gulam, one of the things that has been fixed is that rm and other commands that do not deal with directories will skip them if given directories as args (the command line expansion is done before it is known what command is going to use the args), instead of barfing at them. One of the features of the 'cp' command is that if it is given the name of a directory as the source arguement, then it will copy the entire directory to the destination (if the destination is also a directory). But your example is a good one, and shows up a problem in this scheme of things. It'll be interesting to see what solution Prabhaker come up with. -- usenet: {decvax,cbatt,cbosgd,sun}!cwruecmp!bammi jwahar r. bammi csnet: bammi@cwru.edu <---------Please note change of address arpa: bammi@cwru.edu <---------Please note change of address compuServe: 71515,155