UNIX


CAN


1 : 2 # @(#) can v1.0 Maintain file trash can Author: Russ Sage 4 CAN=$HOME/.trashcan 6 if [ ! -d $CAN ] 7 then mkdir $CAN 8 fi 10 if [ "`echo \"$1\"|cut -c1`" = "-" ] 11 then case $1 in 12 -l) echo "$CAN:" 13 ls -al $CAN 14 exit 0;; 15 -r) echo "removing $CAN/*:" 16 rm -rf $CAN/* 17 exit 0;; 18 -z|-?) echo "usage can [-l] [-r] file [file ...]" gt;&2 19 exit 0;; 20 esac 21 fi 23 mv $@ $CAN