This is what i have so far for my delete script. Im having problems trying to deal with wildcards and the absolute and relative paths and deleting multiple files at the same time.
Code:
#!/bin/sh
if [ -d ~/my-applications/bin/dustbin ]
then
echo "dustbin already exists"
else
mkdir ~/my-applications/bin/dustbin
echo "dustbin has been created"
fi
if [ -f ~/my-applications/bin/dustbin/$1 ]
then
echo "file already exists. It will be overwritten"
rm ~/my-applications/bin/dustbin/$1
mv $1 ~/my-applications/bin/dustbin/
else
mv $1 ~/my-applications/bin/dustbin/
echo "file has been moved
fi