Hi I have made a shell script which moves files from a trash bin back to the original directory and also has the option to restoring the file to a directory that is specified by the user. The restoring it to the original directory is working fine, the restoring it to a specified directory is now.
My code is below.
Can someone help?
if [ ! $1 ] ; then
echo "-n Restores to users specified path."
exit 1
elif [ $1 ] ; then
echo Restoring to original directory...
mv /home/trash/$1 .
elif [ -n $1 ]; then
echo Restoring to specified user directory
mv -i $1 .$2 ;
fi