19 lines
315 B
Bash
Executable File
19 lines
315 B
Bash
Executable File
#!/bin/sh
|
|
|
|
echo ""
|
|
|
|
data() { transmission-remote -l | grep %; }
|
|
[ ! "$(data)" ] && { echo N; exit 1; }
|
|
|
|
per="$(data | awk '{ print $2 }')"
|
|
[ "${per%?}" != 100 ] && echo "$per" || echo ""
|
|
|
|
data | \
|
|
sed "
|
|
s/.*Stopped.*//g;
|
|
s/.*Seeding.*//g;
|
|
s/.*Idle.*//g;
|
|
s/.*Uploading.*//g;
|
|
s/.*%.*//g
|
|
"
|