Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!columbia!caip!princeton!allegra!ulysses!mhuxr!mhuxt!houxm!ihnp4!cuae2!ltuxa!ttrdc!levy From: levy@ttrdc.UUCP (Daniel R. Levy) Newsgroups: net.unix-wizards Subject: Re: VERY SERIOUS rmdir bug Message-ID: <1145@ttrdc.UUCP> Date: Tue, 19-Aug-86 20:46:21 EDT Article-I.D.: ttrdc.1145 Posted: Tue Aug 19 20:46:21 1986 Date-Received: Thu, 21-Aug-86 02:19:49 EDT References: <1074@inset.UUCP> <-932157@homer> <236@bsdpkh.UUCP> Organization: AT&T, Computer Systems Division, Skokie, IL Lines: 37 In article <236@bsdpkh.UUCP>, latham@bsdpkh.UUCP (Ken Latham) writes: >>try this one: >> $ mkdir foo >> $ cd foo >> $ (cd ..; rmdir foo) >>then try >> $ pwd >> $ l >> $ cd .. >> >>this is great fun! > >..... NO it's SHELL !!!! > >these two are "BUGS" in shell not 'RMDIR' ( not technically though ) > >When you remove the cwd from inside shell, you strand yourself there. >Ksh does not have these problems. > Ken Latham, AT&T-IS (via AGS Inc.), Orlando , FL Not really. In SysV or other /bin/sh you're not stranded; you can get out by specifying a fully qualified pathname (e.g., cd /tmp or cd $HOME). Also in some (all?) BSD systems, "pwd" is not a Bourne shell builtin. Besides, even in ksh, the ls and cd commands will fail miserably when used relative to a directory you are in that has been removed. Wouldn't it be better for ksh 'pwd' and 'cd' to warn that the directory was gone, and for 'cd' to also attempt to work figuring that '..' should mean parent directory, etc.? -- ------------------------------- Disclaimer: The views contained herein are | dan levy | yvel nad | my own and are not at all those of my em- | an engihacker @ | ployer or the administrator of any computer | at&t computer systems division | upon which I may hack. | skokie, illinois | -------------------------------- Path: ..!{akgua,homxb,ihnp4,ltuxa,mvuxa, go for it! allegra,ulysses,vax135}!ttrdc!levy