Ucase en MYSQL
- UPDATE `tabla` SET `campo` =CONCAT(UCASE(SUBSTRING(`campo`, 1, 1)),LOWER(SUBSTRING(`campo`, 2)));
Str_replace en MYSQL
- UPDATE `tabla` SET campo=REPLACE(tabla.campo, 'busqueda','reemplazo')
Blog sobre Ubuntu, PHP, programación y nuevas tecnologías.
#!/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
#!/bin/bash
####
echo "Introduzca el nombre de la serie"
read serie
echo "Introduzca el numero de temporada"
read temporada
#####
cd /tmp/
wget "http://www.seriesyonkis.com/serie/"$serie"/" -e robots=off --user-agent="movil Mozilla/5.0 (X11; U; Linux i686; es-CL; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13" -O $serie &>/dev/null
cat $serie | awk -F'>' '/^a href/{split($1,F,"\"");print F[2],$NF}' RS='<' &> $serie".enlaces"
grep $temporada"x" $serie".enlaces" &> $serie
egrep -o "http:.*/ " $serie &> $serie".enlaces"
echo $serie" "$temporada
for capitulo in $(cat $serie."enlaces"); do
wget $capitulo -e robots=off --user-agent="movil Mozilla/5.0 (X11; U; Linux i686; es-CL; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13" -O "capitulo" &>/dev/null
cat "capitulo" | awk -F'>' '/^a href/{split($1,F,"\"");print F[2],$NF}' RS='<' &> "capitulo.enlaces"
grep "DESCARGAR DE megaupload" "capitulo.enlaces" &> "capitulo"
egrep -o "http:.*" capitulo | cut -d " " -f1 | head -n1 &> "capitulo.enlaces"cat
for descarga in $(cat "capitulo.enlaces"); do
wget $descarga -e robots=off --user-agent="movil Mozilla/5.0 (X11; U; Linux i686; es-CL; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13" -O "descarga" &>/dev/null
cat "descarga" | awk -F'>' '/^a href/{split($1,F,"\"");print F[2],$NF}' RS='<' &> "descarga.enlaces"
cat "descarga.enlaces"
rm "descarga.enlaces"
rm "descarga"
done;
rm "capitulo"
rm "capitulo.enlaces"
done
rm $serie
rm $serie".enlaces"
exit 0
montar
firefox
thunderbird
emesene
rythmbox
exit 0


