Date arithmetic on Unix - Hewlett Packard

This is a discussion on Date arithmetic on Unix - Hewlett Packard ; Greetings to the -L, I know that this is not an MPE question but I gather that there are loads of e3000 sites out there that also have 9000's and other Unix boxes. I have been asked to take an ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Date arithmetic on Unix

  1. Date arithmetic on Unix

    Greetings to the -L,

    I know that this is not an MPE question but I gather that there are
    loads of e3000 sites out there that also have 9000's and other Unix
    boxes.

    I have been asked to take an existing Korn (ksh) script and remove the
    need to manually edit some dates in it (today - 1 month, today - 1 day,
    today + 1 day, today + 1 month, etc) by getting the shell to calculate
    them itself.

    All the methods I have currently found required a date command which
    recognises the -d switch. Unfortunately our doesn't.

    If I am unable to get the shell to do it then I'll have to write a small
    program in C or C++ which will open a can of worms with the supplier of
    the system.

    Any suggestions (clean ones please) will be gratefully received.

    regards,

    Robert W.Mills
    Business Systems Development Analyst
    Group Information Systems & Technology
    Pinnacle Entertainment
    DDI: +44 (0)20 8309 3604


    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


  2. Re: Date arithmetic on Unix

    It is not clear why you can't use C or C++ routines. They are likely
    available free. Moreover, there are probably several different versions of
    what you need available in COBOL for example. Would that work for you?
    Shell scripting would not be my first choice for this.

    Charles Finley
    619-795-0720
    > -----Original Message-----
    > From: HP-3000 Systems Discussion [mailto:HP3000-L@RAVEN.UTC.EDU] On Behalf
    > Of Robert Mills
    > Sent: Wednesday, March 05, 2008 7:03 AM
    > To: HP3000-L@RAVEN.UTC.EDU
    > Subject: Date arithmetic on Unix
    >
    > Greetings to the -L,
    >
    > I know that this is not an MPE question but I gather that there are
    > loads of e3000 sites out there that also have 9000's and other Unix
    > boxes.
    >
    > I have been asked to take an existing Korn (ksh) script and remove the
    > need to manually edit some dates in it (today - 1 month, today - 1 day,
    > today + 1 day, today + 1 month, etc) by getting the shell to calculate
    > them itself.
    >
    > All the methods I have currently found required a date command which
    > recognises the -d switch. Unfortunately our doesn't.
    >
    > If I am unable to get the shell to do it then I'll have to write a small
    > program in C or C++ which will open a can of worms with the supplier of
    > the system.
    >
    > Any suggestions (clean ones please) will be gratefully received.
    >
    > regards,
    >
    > Robert W.Mills
    > Business Systems Development Analyst
    > Group Information Systems & Technology
    > Pinnacle Entertainment
    > DDI: +44 (0)20 8309 3604
    >
    >
    > * To join/leave the list, search archives, change list settings, *
    > * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
    >
    > __________ NOD32 2923 (20080305) Information __________
    >
    > This message was checked by NOD32 antivirus system.
    > http://www.eset.com


    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


  3. Re: Date arithmetic on Unix

    Robert,

    Perhaps this will help

    http://www.unix.com/unix-dummies-que...html#post16559

    Watch the wrap.....



    Robert Mills wrote:
    > Greetings to the -L,
    >
    > I know that this is not an MPE question but I gather that there are
    > loads of e3000 sites out there that also have 9000's and other Unix
    > boxes.
    >
    > I have been asked to take an existing Korn (ksh) script and remove the
    > need to manually edit some dates in it (today - 1 month, today - 1 day,
    > today + 1 day, today + 1 month, etc) by getting the shell to calculate
    > them itself.
    >
    > All the methods I have currently found required a date command which
    > recognises the -d switch. Unfortunately our doesn't.
    >
    > If I am unable to get the shell to do it then I'll have to write a small
    > program in C or C++ which will open a can of worms with the supplier of
    > the system.
    >
    > Any suggestions (clean ones please) will be gratefully received.
    >
    > regards,
    >
    > Robert W.Mills
    > Business Systems Development Analyst
    > Group Information Systems & Technology
    > Pinnacle Entertainment
    > DDI: +44 (0)20 8309 3604
    >
    >
    > * To join/leave the list, search archives, change list settings, *
    > * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
    >
    >


    * To join/leave the list, search archives, change list settings, *
    * etc., please visit http://raven.utc.edu/archives/hp3000-l.html *


+ Reply to Thread