File: mp3_robot

package info (click to toggle)
rccp 0.9-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 244 kB
  • ctags: 44
  • sloc: ansic: 830; sh: 256; perl: 134; makefile: 71
file content (29 lines) | stat: -rwxr-xr-x 482 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh
#CCCP script that watches a query and downloads all matches

#If you want more precis query edit the regexp

#the actual script is in dlrobot.pl 


case $# in
0) echo "Usage: " `basename $0` "<search query>";
	exit 255;
esac 

searchquery="*$1*1"

cccp -L > /dev/null
if [ $? -ne "0" ]
then
	echo "Please connect to a hub first"
	exit
fi

cccp -r "DONE"

while [ 1 ]
do
cccp -N -s "$searchquery" | awk -F\| '{if(match($2,/mp3$/))print $0}' | perl dlrobot.pl
sleep 60
done