summaryrefslogtreecommitdiffstats
path: root/god/streams/bin/helper/streamfind
blob: 32b84a4eea835b4ed204fa5a24fa09335e8a11c6 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh
cat stream.db | while read url name;do
    curl $url --max-time 1 2>/dev/null| sed -n 's/[fF]ile[0-9]=\(.*\)/\1/p' > "streamfinder/$name"
    if [ "x`cat \"streamfinder/$name\"`" == "x" ];then
        rm "streamfinder/$name"
        echo "$name empty or not a stream"
    else
        echo "wrote $name"
    fi
done