martes, 1 de marzo de 2011

Script para ver películas

Aquí os dejo un script que os recomienda aleatoriamente una película y os la abre en el firefox si la elegís. Es un buen sistema para esos días que da pereza escoger y navegar! Enlace PasteBin

#!/bin/bash
    OP=1
    cd /tmp/
    while [ $OP -eq 1 ]
    do
   
        VALOR=`echo $(($RANDOM%9999))`
        wget http://www.divxonline.info/pelicula/$VALOR/Pambufering-All-Day-Long/ &>/dev/null
        cat index.html | egrep "<title>(.)*</title>" | sed -e :a -e 's/<[^>]*>//g;/</N;//ba'
        rm index.html
        echo "1 para byscar otra"
        read OP
        if [ $OP -ne 1 ]; then
            firefox http://www.divxonline.info/pelicula/$VALOR/Pambufering-All-Day-Long/
        fi
    done

No hay comentarios:

Publicar un comentario