Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #!/bin/bash
  2. FileP="$(grep -i "$1" $HOME/.restore.info | cut -d ":" -f1)"
  3. FileN="$(grep -i "$1" $HOME/.restore.info | cut -d":" -f2)"
  4. echo "FileN"
  5. if [ $1 -eq 0 ]
  6. then
  7. echo "No input detected"
  8. exit 1;
  9.  
  10. elif [ "$FileN" = "$1" ]
  11. then
  12. echo "File found sending back to original location"
  13. mv ~/deleted/$1 $FPath
  14.  
  15. else
  16. echo "File does not exist"
  17. exit 2;
  18. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement