but this script won't work, it is telling me, that I have to many arguments
file_to_remove=$*
dirIn=`pwd`
if [ \(-f $HOME/deleted/.rm.cfg \) ]
then
deleted_dir = `cat $HOME/.rm.cfg`
for i in $file_to_remove
do
if [! \(-f $HOME/deleted/$i -a -w $HOME/deleted/$i \)]
then
mv $dirIn/$i $HOME/delete
else
rm $dirIn/$i
fi
done
else
echo "moved to recycle bin"
Thanks for helping me
file_to_remove=$*
dirIn=`pwd`
if [ \(-f $HOME/deleted/.rm.cfg \) ]
then
deleted_dir = `cat $HOME/.rm.cfg`
for i in $file_to_remove
do
if [! \(-f $HOME/deleted/$i -a -w $HOME/deleted/$i \)]
then
mv $dirIn/$i $HOME/delete
else
rm $dirIn/$i
fi
done
else
echo "moved to recycle bin"
Thanks for helping me