Sysdate setting in bash_profile
Hi,
this is my situation,I'm taking backup for some files in that i need to append the sysdate so that i can easily identify which file has to restore at some point,I've tried the following In my bash_profile(RHEL4) Code:
SYSDATE=`%d/%m/%Y` Code:
[malick@home ~]$ echo $SYSDATE |
Try
Code:
SYSDATE="$( date '+%d/%m/%Y' )"
|
Quote:
It's working but for half of my requirement ,it's giving me the current date but not with the exact timestamp,like if i logged in a shell the SYSDATE is set as constant value rather than the sync with the clock .so the SYSDATE is always same after i logged in .i need something eactly matches as same as that of date command |
All times are GMT -5. The time now is 02:51 AM. |