If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it.
- Richard Pattis
#!/bin/bash
#
# This is an rm replacement to use a trash folder.
#
if [ ! -d $HOME/.junk ]
then
mkdir $HOME/.junk
fi
case $1 in
-l)
ls -l $HOME/.junk
;;
-p)
rm $HOME/.junk/*
;;
*)
for VAR in $*
do
mv $VAR $HOME/.junk/$VAR
done
esac