Path: utzoo!attcan!uunet!cbmvax!ditto From: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Newsgroups: comp.unix.wizards Subject: Re: New user .login file && a question Summary: cp(1) doesn't unlink(2) Message-ID: <4563@cbmvax.UUCP> Date: 24 Aug 88 23:00:53 GMT References: <28862@bbn.COM> Reply-To: ditto@cbmvax.UUCP (Michael "Ford" Ditto) Organization: Commodore Technology, West Chester, PA Lines: 23 In article <28862@bbn.COM> mesard@BBN.COM () writes: >grep -v "FIRST_LOGIN" ~/.login > /tmp/$user.login #FIRST_LOGIN >cp /tmp/$user.login ~/.login #FIRST_LOGIN >What gives? Why would csh lose it's place in what I expected to be an >unlink'ed but not yet forgotten file? ^^^^^^ You never unlinked the file. Put a "rm ~/.login" in between the grep and the cp. Remember that this will lose the mode settings of ~/.login, A better way would be something like: if ( -f ~/.firstlogin ) source ~/.firstlogin and ~/.firstlogin could remove itself any time it saw fit. -- -=] Ford [=- . . (In Real Life: Mike Ditto) . : , ford@kenobi.cts.com This space under construction, ...!ucsd!elgar!ford pardon our dust. ditto@cbmvax.commodore.com