Worm/Passwords (really: 'rm *')

M.R.Murphy mrm at sceard.UUCP
Sat Nov 19 05:07:14 AEST 1988


In article <3036 at haven.umd.edu> louie at 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 at 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 $*



More information about the Comp.unix.wizards mailing list