Created
October 23, 2017 09:10
-
-
Save curquiza/b44d761a510b473701ac74aa96a67db0 to your computer and use it in GitHub Desktop.
Move yours files in your trash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ ! -d ~/.Trash ] | |
then | |
echo "rmtrash: the directory ~/.Trash does not exist" | |
exit | |
fi | |
for file in $@ | |
do | |
if [ -e $file ] | |
then | |
if [ -e ~/.Trash/$file ]; then | |
rm -rf ~/.Trash/$file | |
fi | |
mv $file ~/.Trash | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment