File: ebook_startrobot

package info (click to toggle)
rccp 0.5-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 164 kB
  • ctags: 40
  • sloc: ansic: 827; sh: 127; perl: 112; makefile: 66
file content (18 lines) | stat: -rwxr-xr-x 393 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/sh
#CCCP script that watches a query and downloads all matches

#OBS!!!
#you probably want to change the awk regexp
#will match rows where file 2 (filename) has mp3, pdf or zip extension

#the actual script is in dlrobot.pl 

searchquery="*ebook*1"

cccp -r "DONE"

until 1
do
cccp -N -s "$searchquery" | awk -F\| '{if(match($2,/zip$|pdf$/))print $0}' | perl dlrobot.pl
sleep 600 
done