dwmb-torrents (350B) - raw


      1 #!/bin/sh
      2 
      3 transmission-remote -l | grep "%\|n/a" |
      4 	sed " # The letters are for sorting and will not appear.
      5 	s/.*Idle.*/B /;
      6 	s/.*Queued.*/C /;
      7 	s/.*Stopped.*/D /;
      8 	s/.*Uploading.*/E /;
      9 	s/.*Seeding.*/F /;
     10 	s/.*100%.*/G /;
     11 	s/.*%.*/A /;
     12 	s/.*Downloading.*/A /" |
     13 		sort -h | uniq -c | awk '{print $3, $1}' | paste -sd ' ' -