Path: utzoo!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!sceard!mrm From: mrm@sceard.UUCP (M.R.Murphy) Newsgroups: comp.unix.wizards Subject: Re: Worm/Passwords (really: 'rm *') Message-ID: <860@sceard.UUCP> Date: 18 Nov 88 19:07:14 GMT References: <22401@cornell.UUCP> <4627@rayssd.ray.com> <8563@rpp386.Dallas.TX.US> <125@embossed.UUCP> <672@quintus.UUCP> <466@yarra.oz.au> Reply-To: mrm@sceard.UUCP (0040-M.R.Murphy) Organization: Sceard Systems, Inc., Carlsbad, CA 92009 Lines: 30 In article <3036@haven.umd.edu> louie@trantor.umd.edu (Louis A. Mamakos) writes: >In the C-shell: > > % set noglob > >You will have no further problems with pesky '*' characters. Haven't we >solved this problem yet? Is this is problem that needs to be solved? Is >this a problem at all? > > > > >Louis A. Mamakos WA3YMH Internet: louie@TRANTOR.UMD.EDU >University of Maryland, Computer Science Center - Systems Programming I think that the following shell script does about what is asked for. The idea is to use existing tools rather than change exisiting tools. #! /bin/sh - if test `echo "$*" |wc -w` -gt 5 then echo ": expands to more than 5 arguments, are you sure? \c" read answer if test "$answer" != "yes" -a "$answer" != "y" then exit 1 fi fi #change "echo" below to the command(s) that you feel like doing for $* echo $*