tags:

views:

50

answers:

1

we are using hp-ux servers we need to get 2 hours ago datetime value in bash shell script ?

how can i do that any experiences ?

A: 

I'm not a shell script expert, but you may want to check this site at unix.com. They provide this example for subtracting from dates:

   # subtract from any date
    date --date "$dte 3 days 5 hours 10 sec ago"
    date --date "$dte -3 days -5 hours -10 sec"
JYelton