Xref: utzoo comp.unix.wizards:12435 news.sysadmin:1480 Path: utzoo!attcan!uunet!portal!atari!achar From: achar@atari.UUCP (Alan Char) Newsgroups: comp.unix.wizards,news.sysadmin Subject: fixing rm * (was: Worm/Passwords) Message-ID: <1232@atari.UUCP> Date: 15 Nov 88 00:39:36 GMT References: <22401@cornell.UUCP> <4627@rayssd.ray.com> <8563@rpp386.Dallas.TX.US> <125@embossed.UUCP> <672@quintus.UUCP> Reply-To: achar@atari.UUCP (Alan Char) Followup-To: comp.unix.wizards Organization: Atari (US) Corporation, Sunnyvale, California Lines: 23 In article <672@quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: |Now, how _do_ you fix "rm *"? Suppose you restrict rm to delete exactly |one file. Watch: | foreach F (* .o) | rm $F | end |OOPS! Major bug in foreach! Better fix that. | [ other examples ] | |Moral: you can't change _one_ thing. Actually, you can change the shell. (Nowadays, that's more like three to five things.) For example, I would REALLY appreciate in csh a variable set expandcheck=5 So that if some shell expansion expanded to more than 5 things, it would prompt for confirmation: % rm * .o *: matches 400 files, are you sure? Comments on this idea? --Alan