How to create a formatted timestamp and use it in filename in a script?

From: Ulf Meinhardt (ulf2m_at_email.com)
Date: 01/29/05

  • Next message: andy scally: "Games won't work."
    Date: Sat, 29 Jan 2005 00:46:01 +0100
    
    

    I want to
    1.) get the current timestamp (including milliseconds !)
    2.) format it according to usual options and finally
    3.) create a filename from it

    All together it should be similar to:

    myts=getTimestamp(dd.MM.yyyy_HH:mm:ss:ms)
    myfilename=aaa_{$ts}.log

    How do I do this in unix shell script ?

    Ulf


  • Next message: andy scally: "Games won't work."

    Relevant Pages