#!/bin/sh
#Guardar serial que tiene en la zona antes del cambio:
SERIAL_VIEJO_COMPLETO=`cat mi-zona.com.ar | grep serial |cut --delimiter=" " -f 1`
#Obtener numero de serial solo de la zona antes del cambio:
SERIAL_SOLO_VIEJO=`echo $SERIAL_VIEJO_COMPLETO | cut -c9,10`
#Obtener fecha sola antes del cambio, sin incluir los ultimos digitos del serial:
FECHA_VIEJA=`echo $SERIAL_VIEJO_COMPLETO|cut -c1-8`
#Nuevo formato de la fecha para el serial, falta agregar el nuevo serial:
FECHA=$(date +%Y%m%d)
#Obtener numero de serial viejo solo:
SERIAL_SOLO_VIEJO=`echo $SERIAL_VIEJO_COMPLETO | cut -c9,10`
#Sumar numero serial viejo completo +1 cuando las fechas son iguales:
let NEW_SERIAL=SERIAL_VIEJO_COMPLETO+1
if test $FECHA -eq $FECHA_VIEJA
then
#echo "son iguales, solo incrementar el serial"
let SERIAL_NUEVO_COMPLETO=SERIAL_VIEJO_COMPLETO+1
echo $SERIAL_NUEVO_COMPLETO
else
#echo "son distintas, cambiar la fecha y poner el serial a 00"
echo `echo $FECHA`00
fi
lunes, 25 de mayo de 2009
viernes, 8 de mayo de 2009
Huevos de Pascuas
Poderes de Super Vaca de apt-get:
server1:~# apt-get moo
Tren:
server1:~# apt-get install sl
server1:~# sl
server1:~# sl -l
server1:~# sl -F
server1:~# sl -e
server1:~# sl -alFe
Aptitude, tiene Huevos?
server1:~# aptitude moo
There are no Easter Eggs in this program.
server1:~# aptitude moo -v
There really are no Easter Eggs in this program.
server1:~# aptitude moo -vv
Didn't I already tell you that there are no Easter Eggs in this program?
server1:~# aptitude moo -vvv
Stop it!
server1:~# aptitude moo -vvvv
Okay, okay, if I give you an Easter Egg, will you go away?
server1:~# aptitude moo -vvvvv
All right, you win.
server1:~# aptitude moo -vvvvvv
What is it? It's an elephant being eaten by a snake, of course.
Jajaja, cualquiera, una vibora comiendo un elefante, jojooo.
Otro haciendo telnet:
telnet towel.blinkenlights.nl
server1:~# apt-get moo
Tren:
server1:~# apt-get install sl
server1:~# sl
server1:~# sl -l
server1:~# sl -F
server1:~# sl -e
server1:~# sl -alFe
Aptitude, tiene Huevos?
server1:~# aptitude moo
There are no Easter Eggs in this program.
server1:~# aptitude moo -v
There really are no Easter Eggs in this program.
server1:~# aptitude moo -vv
Didn't I already tell you that there are no Easter Eggs in this program?
server1:~# aptitude moo -vvv
Stop it!
server1:~# aptitude moo -vvvv
Okay, okay, if I give you an Easter Egg, will you go away?
server1:~# aptitude moo -vvvvv
All right, you win.
server1:~# aptitude moo -vvvvvv
What is it? It's an elephant being eaten by a snake, of course.
Jajaja, cualquiera, una vibora comiendo un elefante, jojooo.
Otro haciendo telnet:
telnet towel.blinkenlights.nl
Suscribirse a:
Entradas (Atom)