• Category Archives Uncategorized
  • Saturdaynight Ubuntu puzzle

    For the Unix saturday night puzzle entry:


    #!/bin/bash

    cat $1|while read EMPID FIRST INIT LAST JOB SEX DATEX SAL EXT1 EXT2
    do
    if [[ ${SAL} == "" && FIRST != "" ]];
    then
    SAL=${DATEX}
    DATEX=${SEX}
    SEX=${JOB}
    JOB=${LAST}
    LAST=${INIT}
    INIT="";
    fi
    let DATEPOCH=`date -d "$DATEX" +%s 2>/dev/null` 2>/dev/null

    let DATEPOCH=${DATEPOCH}-1
    DATEX=`date --date @${DATEPOCH} +"%Y-%m-%d"`
    if [[ ${EXT1} != "" ]];
    then
    printf "Emp ID firstNme Init lastName job sex DOJ salary\n";
    else
    printf "%6s %-9s %3s %-9s %-8s %1s %10s %s\n" "$EMPID" "$FIRST" "$INIT" "$LAST" "$JOB" "$SEX" "$DATEX" "$SAL";
    fi
    done


  • Welcome to my unix pages!

    Welcome everyone to my unix pages.

    Since not everyone who visits knows about my work, let me explain a little bit.

    I am a unix administrator with 15 years experience in the field. I have administrated tons of different setups, from small to large scales, from a few machines to 1000+ serverparks.

    I am currently employed and not looking for work.

    I am currently administrating Debian & Gentoo Linux, AIX and a few other flavors of unix.