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
- Previous message: Floyd L. Davidson: "Re: Difference between .bashrc and .bash_profile?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message: Floyd L. Davidson: "Re: Difference between .bashrc and .bash_profile?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|