fixing rm * (was: Worm/Passwords)

Joseph S. D. Yao jsdy at hadron.UUCP
Wed Nov 23 02:08:28 AEST 1988


In article <1232 at atari.UUCP> achar at atari.UUCP (Alan Char) writes:
>In article <672 at quintus.UUCP> ok at quintus.UUCP (Richard A. O'Keefe) writes:
>|Now, how _do_ you fix "rm *"?  ...
>	 if some shell expansion expanded to more than 5 things, it would
>prompt for confirmation:

What I did, a decade ago, was to have a list of _commands_ which the
shell, after calling glob, would always prompt for after printing out
the entire expanded command line.  The list included "rm" and "rmdir".

No prompting if "glob" was not called.

Perhaps I should go resurrect that code.

	Joe Yao		jsdy at hadron.COM (not yet domainised)
	hadron!jsdy@{uunet.UU.NET,dtix.ARPA,decuac.DEC.COM}
	arinc,att,avatar,blkcat,cos,decuac,dtix,\
	ecogong,empire,gong,grebyn,inco,insight, \!hadron!jsdy
	kcwc,lepton,netex,netxcom,phw5,rlgvax,	 /
	seismo,sms,smsdpg,sundc,uunet		/



More information about the Comp.unix.wizards mailing list