Slashdot Mirror


User: elvism

elvism's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Korn Shell Script to find last day of month on Essential UNIX Tricks and Tools? · · Score: 1

    Here is a script I put together to find the last day of the month using 'cal' -useful for checks in a cron job for only the last day of the month.

    #!/bin/ksh
    integer count=0

    cal | while read A B C D E F G
    do
    ((count+=1))
    if ((count>3)) ; then
    if [[ -z $A ]] ; then
    break
    elif [[ -z $B ]] ; then
    lastday=$A
    break
    elif [[ -z $C ]] ; then
    lastday=$B
    break
    elif [[ -z $D ]] ; then
    lastday=$C
    break
    elif [[ -z $E ]] ; then
    lastday=$D
    break
    elif [[ -z $F ]] ; then
    lastday=$E
    break
    elif [[ -z $G ]] ; then
    lastday=$F
    break
    else
    lastday=$G
    fi
    fi
    done

    print "$lastday"
    exit 0

  2. Re:I still don't get Microsoft's argument... on RMS Responds To Allchin's Comments · · Score: 1

    I think its a ploy...

    Get rid of OpenSource etc. and then release their
    own version of Linux/UNIX/whatever...

    Or it could be that I've had one too much mugs of
    coffee this morning.... go figure.