<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Posteet: linux,bash</title> 
    <link>http://www.posteet.com/</link> 
    <description>Recent posteets posted to Posteet</description>
    <ttl>60</ttl>

    
    <item>
        <title>Utiliser une version antérieur de GCC</title>
        <link>http://www.posteet.com/view/1355</link>
        <description>
        <![CDATA[<pre>export CC=/usr/bin/gcc-4.1</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/gcc">[gcc]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a> ]]>        </description>
        <dc:creator>sox</dc:creator>
        <pubDate>Tue, 04 Nov 2008 12:43:59 +0000</pubDate>

            <category>bash</category>
            <category>gcc</category>
            <category>linux</category>
    
    </item>

  
    <item>
        <title>Appliquer les changements sur Apache après avoir fait des modifs dans php.ini</title>
        <link>http://www.posteet.com/view/1185</link>
        <description>
        <![CDATA[<pre>service httpd reload</pre> <a href="http://www.posteet.com/tags/apache">[apache]</a>  <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/php">[php]</a>  <a href="http://www.posteet.com/tags/shell">[shell]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Mon, 11 Aug 2008 09:17:14 +0000</pubDate>

            <category>apache</category>
            <category>bash</category>
            <category>linux</category>
            <category>php</category>
            <category>shell</category>
    
    </item>

  
    <item>
        <title>scp resume</title>
        <link>http://www.posteet.com/view/1115</link>
        <description>
        <![CDATA[<pre># Add this alias into ~/.bashrc
alias scpresume='rsync --partial --progress --rsh=ssh'

# begin a scp copy:
scp foo user@remotehost:/tmp/

# if a problem occur during the copy, simply type:
scpresume foo user@remotehost:/tmp/
# enjoy :-)</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/ssh">[ssh]</a> ]]>        </description>
        <dc:creator>jade</dc:creator>
        <pubDate>Fri, 18 Jul 2008 07:57:04 +0000</pubDate>

            <category>bash</category>
            <category>linux</category>
            <category>ssh</category>
    
    </item>

  
    <item>
        <title>déconnecter sa session KDE à distance</title>
        <link>http://www.posteet.com/view/1044</link>
        <description>
        <![CDATA[<pre>dcop --user $USER --session `dcop --user $USER --list-sessions | grep DCOP`  ksmserver ksmserver logout 0 0 0</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/kde">[kde]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a> ]]>        </description>
        <dc:creator>bobuse</dc:creator>
        <pubDate>Fri, 04 Jul 2008 14:33:20 +0000</pubDate>

            <category>bash</category>
            <category>kde</category>
            <category>linux</category>
    
    </item>

  
    <item>
        <title>Afficher la liste des fichiers modifiés sur l'execution d'une commande svn status -u</title>
        <link>http://www.posteet.com/view/1010</link>
        <description>
        <![CDATA[<pre>svn status -u $liste_file_to_update | egrep '^M' | cut -c 9- | sed &quot;s/[1-9 ][1-9 ]*\//\//g&quot;</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/svn">[svn]</a> ]]>        </description>
        <dc:creator>gameplayer</dc:creator>
        <pubDate>Tue, 17 Jun 2008 11:04:25 +0000</pubDate>

            <category>bash</category>
            <category>linux</category>
            <category>svn</category>
    
    </item>

  
    <item>
        <title>Configuration réseau sous Fedora core 6</title>
        <link>http://www.posteet.com/view/830</link>
        <description>
        <![CDATA[<pre>fichier :  /etc/sysconfig/network-scripts/ifcfg-eth2
configuration :
DEVICE=eth2
BOOTPROTO=static
ONBOOT=yes
HWADDR=00:1a:20:6a:d8:a4
IPADDR=192.168.1.129
NETMASK=255.255.255.128

fichier : /etc/sysconfig/network
configuration :
NETWORKING=yes
HOSTNAME=toto.lan.fr
GATEWAY=192.168.1.254</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/configuration">[configuration]</a>  <a href="http://www.posteet.com/tags/fedora">[fedora]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/reseau">[reseau]</a> ]]>        </description>
        <dc:creator>neorom</dc:creator>
        <pubDate>Fri, 14 Mar 2008 14:17:37 +0000</pubDate>

            <category>bash</category>
            <category>configuration</category>
            <category>fedora</category>
            <category>linux</category>
            <category>reseau</category>
    
    </item>

  
    <item>
        <title>Changer les permissions récursivement sur les dossiers uniquement</title>
        <link>http://www.posteet.com/view/812</link>
        <description>
        <![CDATA[<pre>#Pour changer les permissions récursivement sur les dossiers sans toucher aux autres fichiers :

chmod u-w $(ls -l -R | sed -n '/^d/p' | awk '{print $9 }')

#va enlever le droit d'écriture à tous les dossiers sans toucher aux autres fichiers
#utile par exemple pour appliquer le droit d'exécution seulement aux dossiers pour pouvoir les parcourir sans pour autant rendre les autres fichiers exécutables</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/shell">[shell]</a>  <a href="http://www.posteet.com/tags/unix">[unix]</a> ]]>        </description>
        <dc:creator>jon207</dc:creator>
        <pubDate>Thu, 06 Mar 2008 20:51:29 +0000</pubDate>

            <category>bash</category>
            <category>linux</category>
            <category>shell</category>
            <category>unix</category>
    
    </item>

  
    <item>
        <title>Liste des paquets installés classés par taille</title>
        <link>http://www.posteet.com/view/805</link>
        <description>
        <![CDATA[<pre>dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n</pre> <a href="http://www.posteet.com/tags/administration">[administration]</a>  <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/debian">[debian]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a> ]]>        </description>
        <dc:creator>bobuse</dc:creator>
        <pubDate>Sat, 01 Mar 2008 12:18:20 +0000</pubDate>

            <category>administration</category>
            <category>bash</category>
            <category>debian</category>
            <category>linux</category>
    
    </item>

  
    <item>
        <title>Redirecting output of the bash keyword time</title>
        <link>http://www.posteet.com/view/803</link>
        <description>
        <![CDATA[<pre>time command &gt; timelog doesn't work, because time outputs to stderr
time command 2&gt; timelog doesn't work either, because time actually is a bash keyword, and it's always run in a subshell

Redirecting the output of time can be achieved by executing the whole command in a block, then redirecting its output:
{ time command; } 2&gt; timelog

Note: Linux also provides a time binary (/usr/bin/time), but with a different output (and might be less efficient ?)</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/time">[time]</a> ]]>        </description>
        <dc:creator>skanx</dc:creator>
        <pubDate>Thu, 28 Feb 2008 18:29:03 +0000</pubDate>

            <category>bash</category>
            <category>linux</category>
            <category>time</category>
    
    </item>

  
    <item>
        <title>Option sympa pour Grep // de la couleur dans ton grep</title>
        <link>http://www.posteet.com/view/758</link>
        <description>
        <![CDATA[<pre>grep --color EXPRESSION [FICHIER]</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/grep">[grep]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/regexp">[regexp]</a>  <a href="http://www.posteet.com/tags/shell">[shell]</a> ]]>        </description>
        <dc:creator>henri</dc:creator>
        <pubDate>Fri, 15 Feb 2008 08:36:33 +0000</pubDate>

            <category>bash</category>
            <category>grep</category>
            <category>linux</category>
            <category>regexp</category>
            <category>shell</category>
    
    </item>

  
    <item>
        <title>Savoir si une extension PHP est installée sur un serveur Linux</title>
        <link>http://www.posteet.com/view/755</link>
        <description>
        <![CDATA[<pre>php -i | grep -i 'SSL'</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/extension">[extension]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/php">[php]</a>  <a href="http://www.posteet.com/tags/serveur">[serveur]</a>  <a href="http://www.posteet.com/tags/shell">[shell]</a> ]]>        </description>
        <dc:creator>cyo</dc:creator>
        <pubDate>Thu, 14 Feb 2008 17:00:16 +0000</pubDate>

            <category>bash</category>
            <category>extension</category>
            <category>linux</category>
            <category>php</category>
            <category>serveur</category>
            <category>shell</category>
    
    </item>

  
    <item>
        <title>Sauvegarde d'un dépôt SVN</title>
        <link>http://www.posteet.com/view/672</link>
        <description>
        <![CDATA[<pre>#!/bin/bash
# Script de sauvegarde incrémentale d'un dépôt subversion
# Il est possible de provoquer une sauvegarde complète en supprimant le dossier version ou son contenu
# Paramètres
# Chemin du dépôt à sauvegarder
pathRepo=&quot;/chemin/repository&quot;;
# Chemin du dossier de sauvegarde
pathBackup=&quot;/chemin/dossier/sauvegarde&quot;;
# Chemin du dossier pour mémoriser la dernière version sauvegardée
pathNumVersion=$pathBackup&quot;/version&quot;;
# Chemin du fichier de logs
pathLog=$pathBackup&quot;/backup.log&quot;;
# Nom du fichier (compris entre la date et l'extension)
fileName=&quot;backup_svn&quot;;
# Format de la date
# Pour le nom du fichier
dateFileFormat=&quot;+%Y%m%d&quot;;
# Pour le log
dateLogFormat=&quot;+%Y-%m-%d %H:%M&quot;;

# Vérifications
# Vérification de l'existence des dossiers de travail
if [ ! -d $pathBackup ]; then
	echo &quot;Dossier $pathBackup inexistant&quot;;
	exit 1;
fi

echo &quot;[$(date &quot;$dateLogFormat&quot;)] Début de la sauvegarde&quot; &gt;&gt; $pathLog;

# Création du dossier de la version si il n'existe pas
if [ ! -d $pathNumVersion ]; then
	mkdir $pathNumVersion;
fi

numVersionLastBackup=$(ls $pathNumVersion);
if [ &quot;$numVersionLastBackup&quot; = &quot;&quot; ]; then
	touch &quot;$pathNumVersion/1&quot;;
	numVersionLastBackup=1;
fi

if [ $numVersionLastBackup -gt 1 ]; then
	backupIncremental=&quot; --incremental&quot;;
	typeBackup=&quot;incr&quot;;
else
	typeBackup=&quot;full&quot;;
fi

# Vérification de l'existance du dépôt
if  ! (svnlook info $pathRepo 2&gt;&gt;$pathLog 1&gt;&quot;/dev/null&quot;) ; then
	echo &quot;[$(date &quot;$dateLogFormat&quot;)] ERREUR : Repository $pathRepo inexistant&quot; &gt;&gt; $pathLog;
	echo &quot;[$(date &quot;$dateLogFormat&quot;)] Fin de l'exécution - Sauvegarde non effectuée&quot; &gt;&gt; $pathLog;
	exit 1;
fi

# Récupération de la dernière version présente dans le dépôt
youngestSvnVersion=$(svnlook youngest $pathRepo);
echo &quot;[$(date &quot;$dateLogFormat&quot;)] Version la plus récente : $youngestSvnVersion&quot; &gt;&gt; $pathLog;

if [ $numVersionLastBackup -gt $youngestSvnVersion ]; then
	echo &quot;[$(date &quot;$dateLogFormat&quot;)] La version la plus récente est la version sauvegardée, la sauvegarde n'est donc pas nécéssaire&quot; &gt;&gt; $pathLog;
	echo &quot;[$(date &quot;$dateLogFormat&quot;)] Fin de la sauvegarde&quot; &gt;&gt; $pathLog;
	exit 0
fi

# Lancement effectif de la sauvegarde
if (svnadmin dump -r$numVersionLastBackup:$youngestSvnVersion$backupIncremental $pathRepo 2&gt;&gt;$pathLog | bzip2 &gt; &quot;$pathBackup/$(date &quot;$dateFileFormat&quot;)_&quot;$fileName&quot;_&quot;$typeBackup&quot;_&quot;$numVersionLastBackup&quot;_to_&quot;$youngestSvnVersion&quot;.svndump.bz2&quot;) ; then
	echo &quot;[$(date &quot;$dateLogFormat&quot;)] Mise à jour du numéro de version&quot; &gt;&gt; $pathLog;
	mv $pathNumVersion/$numVersionLastBackup $pathNumVersion/$(($youngestSvnVersion + 1));
else
	echo &quot;[$(date &quot;$dateLogFormat&quot;)] Erreur lors de la sauvegarde&quot; &gt;&gt; $pathLog;
	echo &quot;[$(date &quot;$dateLogFormat&quot;)] Fin de l'exécution - Sauvegarde non effectuée&quot; &gt;&gt; $pathLog;
	exit 1;
fi

echo &quot;[$(date &quot;$dateLogFormat&quot;)] Fin de la sauvegarde&quot; &gt;&gt; $pathLog;
exit 0</pre> <a href="http://www.posteet.com/tags/backup">[backup]</a>  <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/svn">[svn]</a> ]]>        </description>
        <dc:creator>gameplayer</dc:creator>
        <pubDate>Tue, 15 Jan 2008 07:34:51 +0000</pubDate>

            <category>backup</category>
            <category>bash</category>
            <category>linux</category>
            <category>svn</category>
    
    </item>

  
    <item>
        <title>HOWTO Restore GRUB</title>
        <link>http://www.posteet.com/view/667</link>
        <description>
        <![CDATA[<pre># Boot on a live CD and open a console. sda1 is supposed to be the partition containing the OS
# 1/ Restore GRUB
mount -t proc none /dev/sda1/proc
mount -o bind /dev /dev/sda1/dev
chroot /dev/sda1/ /bin/bash

/usr/sbin/grub
grub &gt; root(hd0,0)    # 0-&gt;a, 1-&gt;b ...      #1-&gt;0, 2-&gt;1 ...
grub &gt; setup(hd0)
grub &gt; quit

# 2/ Check if partition is bootable
fdsik /dev/sda
fdisk &gt; p      # print the partition table
fdisk &gt; a      # toggle a bootable flag
fdsik &gt; 1
fidsk &gt; w

# 3/ Reboot !! That's done</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/fdisk">[fdisk]</a>  <a href="http://www.posteet.com/tags/grub">[grub]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/restore">[restore]</a> ]]>        </description>
        <dc:creator>spirit</dc:creator>
        <pubDate>Mon, 14 Jan 2008 11:48:39 +0000</pubDate>

            <category>bash</category>
            <category>fdisk</category>
            <category>grub</category>
            <category>linux</category>
            <category>restore</category>
    
    </item>

  
    <item>
        <title>Descarga de videos de youtube, metacafé, stage6...</title>
        <link>http://www.posteet.com/view/599</link>
        <description>
        <![CDATA[<pre>#vidxtract.sh:
#-------------------------------------------------------------------------------------------------------------------------------------------
#/bin/bash
######################################################
#
# Autor: Jose Ramon Lambea
# Fecha 27-10-2007
#
# v 0.10.15
#
##[Licencia]
# Esta obra está bajo una licencia Reconocimiento-No
# comercial-Compartir bajo la misma licencia 2.5 España
# de Creative Commons. Para ver una copia de esta
# licencia, visite
# http://creativecommons.org/licenses/by-nc-sa/2.5/es/
# o envie una carta a Creative Commons, 171 Second
# Street, Suite 300, San Francisco, California 94105, USA.
#
##[Compatibilidad]
# Compatible con:
# 251007 Stage6
# TimTube
# Gexo
# UpBloggerX
# XVideos
# 261007 YouTube
# MetaCafe
# 271007 DailyMotion
# SexSube
# HaPorn
# ImgDownload
# Shufuni
# GoEar!
# SecretXXXVideo
# FreeViewMovies
# HardcorePornTube
##[Changelog]
# 271007 Añadida función de convertir en caso
# de descargar un FLV.
# Fix para modo de descarga por lista.
# Cambio de estructuración del código.
######################################################
. ./vidxtract.lib
####################
#
# Limpieza de la pantalla
#
####################
clear

####################
#
# Comprobamos que haya algún argumento
#
####################
if [[ -z $1 ]]
then
echo &quot;Error: No hay URL de entrada&quot;
exit 1
fi

####################
#
# Comprobamos el flag -config
#
####################
if [[ $1 == &quot;-config&quot; ]]
then
configurar
fi

cargar_conf

####################
#
# Comprobamos el flag -f
#
####################
if [[ $1 == &quot;-f&quot; &amp;&amp; $# == &quot;2&quot; ]]
then
echo &quot;Modo lista Activado&quot;
LISTA=&quot;$2&quot;
echo
echo &quot;Se descargarán los ficheros de $LISTA&quot;

for URL in $(cat $LISTA)
do

FILE=$( expr $FILE + 1 )
# Descargamos URL
echo &quot;1.-Descargando...&quot;
wget -nv &quot;$URL&quot; -O &quot;$FILE&quot;

echo &quot;2.-Analizando fichero&quot;
analizar

#Descargamos fichero
echo &quot;3.-Descargando video&quot;
echo &quot;$VIDEO&quot;
wget -nv &quot;$VIDEO&quot; -rO &quot;$FILE&quot;
echo &quot;Fichero descargado&quot;

#Examinando formato y convirtiendo si es necesario
echo &quot;Examinando formato y convirtiendo si es necesario&quot;
convertir
done

else
URL=&quot;$1&quot;

# Descargamos URL
echo &quot;1.-Descargando...&quot;
wget -nv &quot;$URL&quot; -O &quot;$FILE&quot;

echo &quot;2.-Analizando fichero&quot;
analizar


#Descargamos fichero
echo &quot;3.-Descargando video&quot;
echo &quot;$VIDEO&quot;
wget -nv &quot;$VIDEO&quot; -rO &quot;$FILE&quot;
echo &quot;Fichero descargado&quot;

#Examinando formato y convirtiendo si es necesario
echo &quot;Examinando formato y convirtiendo si es necesario&quot;
convertir
fi


#vidxtract.lib:
#-------------------------------------------------------------------------------------------------------------------------------------------
####################
#
# Función para saber que acciones tomar según que servidor se introduce
#
####################
function analizar
{
if [[ $(echo &quot;$URL&quot; | grep -i &quot;stage6[.]divx[.]com&quot; ) ]]
then
VIDEO=$(cat &quot;$FILE&quot; | tr ';' '\n' | grep &quot;[0-9]/[.]divx&quot; | head -1 | sed 's/\&amp;.*$//' )
elif [[ $(echo &quot;$URL&quot; | grep -i &quot;timtube[.]com&quot; ) ]]
then
VIDEO=$(cat &quot;$FILE&quot; | tr '=' '\n' | grep &quot;[0-9][.]flv&quot; | head -1 | sed 's/\&amp;.*$//' )

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;gexo[.]com&quot; ) ]]
then
VIDEO=$(cat &quot;$FILE&quot; | tr &quot;\'&quot; '\n' | grep &quot;[.]flv&quot; | head -1 | sed 's/\&amp;.*$//' )

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;hardcoreporntube[.]com&quot; ) ]]
then
VIDEO=$(cat &quot;$FILE&quot; | tr '&quot;' '\n' | grep &quot;[.]flv&quot; | head -1 )

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;secretxxxvideo[.]com&quot; ) || $(echo &quot;$URL&quot; | grep -i &quot;freeviewmovies[.]com&quot; ) ]]
then
VIDEO=$(cat &quot;$FILE&quot; | tr '&quot;' '\n' | grep &quot;ofconfig&quot; | sed 's/config\=//' )
wget -nv &quot;$VIDEO&quot; -rO &quot;$FILE&quot;
VIDEO=&quot;$(cat $FILE | tr '&quot;' '\n' | grep '[.]flv$' )&quot;

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;imgdownload[.]com&quot; ) ]]
then
VIDEO=$(cat &quot;$FILE&quot; | tr &quot;=&quot; '\n' | grep &quot;[.]flv&quot; | head -1 | sed 's/\&amp;.*$//' )

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;upbloggerx[.]com&quot; ) ]]
then
VIDEO=$(cat &quot;$FILE&quot; | tr '=' '\n' | grep &quot;[0-9][.]flv&quot; | head -1 | sed 's/\&amp;.*$//' )
elif [[ $(echo &quot;$URL&quot; | grep -i &quot;xvideos[.]com&quot; ) ]]
then
VIDEO=$(cat &quot;$FILE&quot; | tr '=' '\n' | grep &quot;[a-Z][.]flv&quot; | head -1 | sed 's/\&amp;.*$//' )
elif [[ $(echo &quot;$URL&quot; | grep -i &quot;youtube[.]com&quot; ) ]]
then
URL=$(echo &quot;$URL&quot; | tr '\?' '/' | tr '=' '/' )
wget -nv &quot;$URL&quot;
URL=$( echo &quot;$URL&quot; | tr '=' '\n' | tail -1 | sed 's/^.*\///' )

echo &quot;$URL&quot;

VIDEO=&quot;http://youtube.com/get_video?video_id=$URL&amp;$(ls -1 cps.swf* | tr '&amp;' '\n' | grep '^t' )&quot;
rm cps.swf*

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;metacafe[.]com&quot; ) ]]
then
VIDEO=$(cat &quot;$FILE&quot; | tr '=' '\n' | grep &quot;ItemFiles&quot; | head -1 | sed 's/\&amp;.*$//' )

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;dailymotion[.]com&quot; ) ]]
then
VIDEO=$(cat &quot;$FILE&quot; | tr '=' '\n' | grep &quot;flv&quot; | grep &quot;get&quot; | head -1 | sed 's/^.* \&quot;//' | sed 's/\&quot;.*$//' | sed 's/\%3A/:/g' | sed 's/\%2F/\//g' | sed 's/\%3F/?/g' | sed 's/\%3D/=/g' )

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;sexsube[.]com&quot; ) ]]
then
VIDEO=&quot;$(cat &quot;$FILE&quot; | tr '\&quot;' '\n' | grep &quot;viewkey&quot; | head -1 | sed 's/config=//' )&quot;
wget -nv &quot;$VIDEO&quot; -rO $FILE
VIDEO=&quot;$(cat &quot;$FILE&quot; | grep &quot;FLVPath&quot; | sed 's/^.*=\&quot;//' | sed 's/\&quot;.*//' )&quot;

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;haporn[.]com&quot; ) ]]
then
VIDEO=&quot;$(cat &quot;$FILE&quot; | tr ' ' '\n' | tr '=' '\n' | grep &quot;www.haporn.com/opt/&quot; | head -1 | sed 's/\/.$/\//' )&quot;
wget -nv &quot;$VIDEO&quot; -rO &quot;$FILE&quot;
VIDEO=&quot;$(cat &quot;$FILE&quot; | grep &quot;FLVPath&quot; | sed 's/^.*=\&quot;//' | sed 's/\&quot;.*//' )&quot;

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;shufuni[.]com&quot; ) ]]
then
mvnm=&quot;$(cat &quot;$FILE&quot; | grep &quot;mvnm&quot; | grep &quot;addVariable&quot; | cut -d '&quot;' -f4)&quot;
sdom=&quot;$(cat &quot;$FILE&quot; | grep &quot;sdom&quot; | grep &quot;addVariable&quot; | cut -d '&quot;' -f4)&quot;
VIDEO=&quot;http://$sdom.shufuni.com/$mvnm&quot;

elif [[ $(echo &quot;$URL&quot; | grep -i &quot;goear[.]com&quot; ) ]]
then
MP3FILE=&quot;http://www.goear.com/files/sst/secm$(echo $URL | sed 's/^.*=//' ).xml&quot;
wget -nv &quot;$MP3FILE&quot; -rO &quot;$FILE&quot;
VIDEO=&quot;$(cat $FILE | tr '&quot;' '\n' | grep '^http' )&quot;

else
echo &quot;Lo siento, VidXtract de momento no es compatible con el servidor insertado&quot;
exit 5

fi
}

####################
#
# Función para convertir de FLV al formato que se haya configurado
#
####################
function convertir
{
if [[ $( file $FILE | grep &quot;Macromedia Flash Video&quot; ) ]]
then
ffmpeg -i &quot;$FILE&quot; $FILE.$FORMAT 2&gt;/dev/null
rm &quot;$FILE&quot;
fi

}

function cargar_conf
{
FILE=&quot;$$&quot;
FORMAT=&quot;$(cat vidxtract.cgf | grep &quot;FORMATO&quot; | sed 's/^.*=//' )&quot;
}

function configurar
{

salir=&quot;0&quot;

while (( $salir != &quot;1&quot; ))
do

select var in &quot;VIDEO&quot; &quot;SALIR&quot;
do
if [[ $var==&quot;VIDEO&quot; ]]
then
clear

echo &quot;##### Configuración del formato de salida&quot;

select var in &quot;mpg&quot; &quot;avi&quot;
do
cat vidxtract.cgf | sed 's/=.*$/\='$var'/' &gt; $$
mv $$ vidxtract.cgf
clear
break
done
fi

if [[ $var==&quot;SALIR&quot; ]]
then
salir=1
break
fi

done

done

exit

}



#vidxtract.cfg:
#-------------------------------------------------------------------------------------------------------------------------------------------
FORMATO=avi</pre> <a href="http://www.posteet.com/tags/bash">[bash]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/youtube">[youtube]</a> ]]>        </description>
        <dc:creator>gnova</dc:creator>
        <pubDate>Thu, 20 Dec 2007 10:18:20 +0000</pubDate>

            <category>bash</category>
            <category>linux</category>
            <category>youtube</category>
    
    </item>

  
    <item>
        <title>Conversion de fichier texte windows/unix</title>
        <link>http://www.posteet.com/view/578</link>
        <description>
        <![CDATA[<pre>#Convertir un fichier texte d'un format Windows/dos vers unix:

  tr -d '\015' &lt; win-format.txt &gt; unix-format.txt

#Convertir un fichier texte d'un format unix vers Windows/dos:

  sed -e 's/$/\r/' unix-format.txt &gt; win-format.txt</pre> <a href="http://www.posteet.com/tags/Bash">[Bash]</a>  <a href="http://www.posteet.com/tags/linux">[linux]</a>  <a href="http://www.posteet.com/tags/Plain text">[Plain text]</a>  <a href="http://www.posteet.com/tags/unix">[unix]</a>  <a href="http://www.posteet.com/tags/windows">[windows]</a> ]]>        </description>
        <dc:creator>sylis</dc:creator>
        <pubDate>Wed, 12 Dec 2007 20:24:39 +0000</pubDate>

            <category>Bash</category>
            <category>linux</category>
            <category>Plain text</category>
            <category>unix</category>
            <category>windows</category>
    
    </item>


</channel>
</rss>
