2011/10/12 Martín Carr
> 2011/10/12 Martin A. Troncoso
>> ¿algo asi? :-P
Le cambié unas cositas, como por ejemplo que permita nombres con
espacios. (si alguien no sabe cómo usar esto, simplemente hay que
ponerlo en un archivo de texto, darle permisos de ejecución y
ejecutarlo. Para que haga algo interesante debe haber algún video
siendo visto en firefox).
#!/bin/bash
let FILES=`lsof -X | grep -i flash | grep tmp | awk '{print
"/proc/"$2"/fd/"$4}' | tr -d u | wc -l`
LISTA=`lsof -X | grep -i flash | grep tmp | awk '{print "/proc/"$2"/fd/"$4}' |
tr -d u `
if [ ! -d $HOME/videosget ]
then
mkdir $HOME/videosget
fi
if [ $FILES -gt 0 ]
then
zenity --question --text "Se encontraron $FILES archivos.\n ¿Desea
reproducirlos?\n\n Presione 'no' para guardarlos"
if [ $? == 0 ]; then
totem $LISTA
else
zenity --question --text "Desea guardar los videos en ~/videosget?"
if [ $? == 0 ]; then
for i in $LISTA
do
cp $i "$HOME/videosget/`zenity --entry --text "Ingrese un
nombre para el archivo $i"`.flv"
done
fi
fi
else
zenity --error --text "No se encontraron videos."
fi
--
Software Libre = Software libertario
http://libroblanco.org.ar
_______________________________________________
Lugro mailing list
[email protected]
http://lugro.org.ar/mailman/listinfo/lugro