capturing the time stamp - Unix

This is a discussion on capturing the time stamp - Unix ; Hi All, I am working on a korn shell script. i have a file such as: DS.PETSCO.20060601203514.20060531.ctl_200607171244 31 i have 2 problems here. 1) i have to capture the time stamp from the above file i.e this number 20060717124431. format ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: capturing the time stamp

  1. capturing the time stamp

    Hi All,

    I am working on a korn shell script.
    i have a file such as:
    DS.PETSCO.20060601203514.20060531.ctl_200607171244 31

    i have 2 problems here.

    1) i have to capture the time stamp from
    the above file i.e this number 20060717124431.
    format of time stamp is YYYYMMDDHHMMSS.

    can anyone plz let me know how do i capture the time stamp.

    2) the second problem is, i have to calculate the next 27 hours
    from the above time stamp.

    SAY time in the above timestamp is 12:44:31 so i have to add
    27 hours to this time stamp.

    Note:when i add 27 hours please note that date also changes.
    so i have to echo the new date and time when i add 27 hours
    to the exisitng time stamp.

    can anyone plx let me know how I do it.

    thanks
    pavi


  2. Re: capturing the time stamp

    On 2006-07-18, pawan_test wrote:
    > Hi All,
    >
    > I am working on a korn shell script.


    Please don't multi-post; if you think a question belongs in more
    than one group, crosspost.

    Your question has been answered in another newsgroup.

    --
    Chris F.A. Johnson, author
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
    ===== My code in this post, if any, assumes the POSIX locale
    ===== and is released under the GNU General Public Licence

  3. Re: capturing the time stamp

    Sorry.. i thought this is a different group.

    pavi
    Chris F.A. Johnson wrote:
    > On 2006-07-18, pawan_test wrote:
    > > Hi All,
    > >
    > > I am working on a korn shell script.

    >
    > Please don't multi-post; if you think a question belongs in more
    > than one group, crosspost.
    >
    > Your question has been answered in another newsgroup.
    >
    > --
    > Chris F.A. Johnson, author
    > Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
    > ===== My code in this post, if any, assumes the POSIX locale
    > ===== and is released under the GNU General Public Licence



  4. Re: capturing the time stamp

    On 2006-07-18, pawan_test wrote:
    > Chris F.A. Johnson wrote:
    >> On 2006-07-18, pawan_test wrote:
    >> > Hi All,
    >> >
    >> > I am working on a korn shell script.

    >>
    >> Please don't multi-post; if you think a question belongs in more
    >> than one group, crosspost.
    >>
    >> Your question has been answered in another newsgroup.


    [Please don't top post]

    > Sorry.. i thought this is a different group.


    It IS a different group; that's the problem.

    --
    Chris F.A. Johnson, author
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
    ===== My code in this post, if any, assumes the POSIX locale
    ===== and is released under the GNU General Public Licence

  5. Re: capturing the time stamp


    Chris F.A. Johnson wrote:
    > On 2006-07-18, pawan_test wrote:
    > > Chris F.A. Johnson wrote:
    > >> On 2006-07-18, pawan_test wrote:
    > >> > Hi All,
    > >> >
    > >> > I am working on a korn shell script.
    > >>
    > >> Please don't multi-post; if you think a question belongs in more
    > >> than one group, crosspost.
    > >>
    > >> Your question has been answered in another newsgroup.

    >
    > [Please don't top post]
    >
    > > Sorry.. i thought this is a different group.

    >
    > It IS a different group; that's the problem.
    >


    pavi;
    "Multi-posting" (Bad) is different than "Cross-posting" (Acceptable if
    appropriate) -- please lookup those terms for further clarification.

    Regards


+ Reply to Thread