transmission-torrent-file-analyzer.sh 278 B

1234567891011
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. torrents=$(find "$PWD" -type f -name "*.torrent")
  4. search="^Name: "
  5. for torrent in $torrents; do
  6. transmission-show "$torrent" | grep "$search" | grep -i --color "${@}"
  7. [[ $? -eq 0 ]] && echo -e "$torrent\n"
  8. done