public:recetas:muestragraficascaminoguifinet
Diferencias
Muestra las diferencias entre dos versiones de la página.
public:recetas:muestragraficascaminoguifinet [2013/11/08 08:34] – creado mperez | public:recetas:muestragraficascaminoguifinet [2013/11/13 11:05] (actual) – mperez | ||
---|---|---|---|
Línea 2: | Línea 2: | ||
< | < | ||
+ | |||
#!/bin/bash | #!/bin/bash | ||
Línea 7: | Línea 8: | ||
# The option -d indicates that the URLs have to be shown in the browser | # The option -d indicates that the URLs have to be shown in the browser | ||
- | if [ $1 == " | ||
+ | #getopt code reused partially from http:// | ||
+ | ARGS=`getopt -o " | ||
+ | -n " | ||
+ | |||
+ | #Bad arguments | ||
+ | if [ $? -ne 0 ]; | ||
+ | then | ||
+ | exit 1 | ||
+ | fi | ||
+ | |||
+ | # A little magic | ||
+ | eval set -- " | ||
+ | |||
+ | DOWNLOAD=" | ||
+ | |||
+ | # Now go through all the options | ||
+ | while true; | ||
+ | do | ||
+ | case " | ||
+ | -d|--download) | ||
+ | DOWNLOAD=" | ||
+ | shift;; | ||
+ | --) | ||
+ | shift | ||
+ | break;; | ||
+ | esac | ||
+ | done | ||
+ | |||
+ | IP=$1 | ||
#for ips in `traceroute -n 10.228.130.1 | grep -v traceroute | cut -d " " -f 4`; do | #for ips in `traceroute -n 10.228.130.1 | grep -v traceroute | cut -d " " -f 4`; do | ||
- | # Para filtrar las 192.168 | + | # to filter the 192.168.X.X |
for ips in `traceroute -n $IP | grep -v traceroute | cut -d " " -f 4 | grep -v -E " | for ips in `traceroute -n $IP | grep -v traceroute | cut -d " " -f 4 | grep -v -E " | ||
url=" | url=" | ||
echo $ips | echo $ips | ||
for i in $(wget -qO - $url | grep $ips| grep href | grep -v language | sed -e ' | for i in $(wget -qO - $url | grep $ips| grep href | grep -v language | sed -e ' | ||
- | if [ $1 == "-d" ]; then | + | if [ $DOWNLOAD |
$BROWSER $i | $BROWSER $i | ||
fi | fi | ||
- | echo " | + | echo " |
done | done | ||
done | done | ||
</ | </ |
public/recetas/muestragraficascaminoguifinet.1383899691.txt.gz · Última modificación: 2013/11/08 08:34 por mperez