Skip to content

Instantly share code, notes, and snippets.

@mboyar
Created November 5, 2020 09:59
Show Gist options
  • Save mboyar/a71342c9069a8364094b90fc6e9a00a4 to your computer and use it in GitHub Desktop.
Save mboyar/a71342c9069a8364094b90fc6e9a00a4 to your computer and use it in GitHub Desktop.
#!/bin/bash
src=""
dest=""
TRASH="$HOME/Trashbin/"
ARGC=$#
[[ -d $TRASH ]] || mkdir -v $TRASH
ret=$?
if(( $ret == 0 )); then
if(( $ARGC == 2 )); then
mv -v $2 $TRASH
elif(( $ARGC == 1 )); then
mv -v $1 $TRASH
else
cat $0
fi
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment