if [ "$1" = "" ] ; then echo need filename as argument; exit; fi

if test -f $1
then
echo file $1 already exists
else
{

if test -f ~/trash/$1
then
{
cp ~/trash/$1 .
echo file $1 undeleted
rm ~/trash/$1
}
else
echo file $1 not found in trash, cannot undelete
fi

}
fi

