TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stupid me
dumb me, here is the script!
Ben Luey
lueyb@carleton.edu
ICQ: 19144397
I didn t realize that jobs and trade and what makes America work would become
a big issue. -- Bob Dole
#!/bin/sh
for FLAGS in $*
do
FLAGS=`echo $FLAGS |sed -e "s/--/dumbgrep/"`
DASH=`echo $FLAGS |grep dumbgrep`
if [ -z $DASH ]; then
echo double dash
if [ $FLAGS = --recursive ]; then
echo --recursive
else
FLAGS=`echo $FLAGS |sed -e "s/dumbgrep/--/"`
NEWFLAGS="$NEWFLAGS $FLAGS"
fi
else
echo no double
RECURE1=`echo $FLAGS |grep - |grep r`
RECURE2=`echo $FLAGS |grep - |grep R`
if [ -z $RECURE1 ]; then
NEWFLAGS="$NEWFLAGS `echo $FLAGS |sed -e "s/r//"`"
elif [ -z $RECURE2 ]
NEWFLAGS="$NEWFLAGS `echo $FLAGS |sed -e "s/R//"`
else
echo good
NEWFLAGS="$NEWFLAGS $FLAGS"
fi
fi
done
#if ( -d /home/delete/$LOGNAME ) then
echo mv $NEWFLAGS /home/delete/$LOGNAME
#else
echo mkdir /home/delete/$LOGNAME
echo mv $NEWFLAGS /home/delete/$LOGNAME
#fi