doc_gonzo

Untitled

Apr 4th, 2020
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. inotifywait -m /home/user/Downloads/torrent -e create -e moved_to |
  4.     while read dir action file; do`
  5.     if [[ "$file" =~ .*torrent$ ]]; then`  
  6.     echo "Found" &&
  7.     cp /home/user/Downloads/torrent/"$file" \
  8.     run/user/1000/gvfs/smbshare\:server\=fooo\,share\=smbserver/transmission/torrent/"$file" &&
  9.     rm /home/user/Downloads/torrent/"$file";
  10.     fi
  11. done
Add Comment
Please, Sign In to add comment