I have created a script of a recycle bin on minix. I move a file that will deleted to a folder instead of deleting it. I have used the alias command on rm command to use the script instead of rm. The problem now is that I have to empty the recycle bin. I wrote this script:
#!/bin/sh
unalias rm
rm -r "/home/recyclebin/*"
alias rm='/home/scriptrm.sh'
#
In this script I unalias rm command so I can use it again then I empty the recycle bin and then alias rm again with the script that moves files to recycle bin. When I run this script it does nothing. I tried only running the script to unalias rm but rm continues with the alias. Does anyone know what's happening?
Thank you.