another scene from a favorite movie

this one needs to be explained a little: Jaime Miravilles (gauche) et Salvador Dali (droite) as the two confused priests in “Un Chien Andalou (Andalusian Dog)” 1929 Un Film De Luis Bunuel Et Salvador Dali

my love for the mystical and magical cURL

begin snippet: function port { if [ $? -ne 0 ] ; then printf “warning: ” if [ $? -eq 6 ]; then echo “cant resolve host” fi if [ $? -eq 7 ]; then echo “cant connect to host” fi printf “site may be down\n” else printf “site is up\n” fi } curl -s … Read More

sql dump adder

this script looks in a specific directory for sql dumps labeled xxx_20080101_xxx_alumn.sql.gz, xxx_20080101_xxx_const.sql.gz & xxx_20080101_xxx_log.sql.gz to ungzip and dump back into sql (assuming the db is there already). change as needed. #!/bin/bash # this script assumes that you have the sql backups gzipped FILE_DIR=/export/tmp/backup/temp if [ $# -lt 2 ]; then printf “\nneeds date of … Read More


boredom led me to write a command that does the same thing but three different ways; assume that the file that is being cat to use for this example contains: line 1 line 2 <form id=”form_login” name=”form_login” method=”post” action=”session_id=XXXXXx.xxxxx.NAM1&locid=0&lf=0&i> and i need NAM1 only. well, i actually need the three letter code and number. it … Read More

another stupid nagios process checker

here is another in the long line of stupid scripts for nagios. this script finds specific process, then counts them and spits out an error level according to setting enjoy!! #!/bin/bash ## replace “ORA_” with some other unique identifier ## from vi :1,$s/ORA_/”unique”/g ORA_TEMP=/tmp/ora_procs.tmp ## replace “ora_” with what you need grep’ed ps -ef | … Read More