September 19th, 2003, 03:16 AM
Anybody know how too get yesterdays date ? Perhaps by manipulating the date command ?
September 19th, 2003, 05:06 PM
Yep, date manipulation - the command:
will give you the date output reading of one day previous on a FreeBSD system. Probably similar on other Unices, man date.
Trying to change its program
Trying to change the mode...crack the code
Images conflicting into data overload
September 22nd, 2003, 05:15 AM
Using Solaris.. could not get it too work. Anyone know ?
September 22nd, 2003, 08:05 AM
>Using Solaris.. could not get it too work. Anyone know ?
% man date
Read up on the commands that your date program supports. There should be an option for adjustment of varying degrees.
September 22nd, 2003, 08:35 AM
Don't know if the TZ (Timezone variable) is set in your environment. If so something like this will do the trick (I also don't have the -v option, or similar alternative, in date).
You might need to change $TZ to your $Timezone variable (if one excists that is).
# Name : pdate
# Purpose : Reports the date 'shift' hours from now, formatting is allowed
typeset -i X
if (( $# < 1 ))
print -u2 "Usage: $0 shift [ + format ]"
print -u2 "Reports the date 'shift' hours from now. Format as in date."
TZ=`echo $TZ | sed -e "s/MET-1/MET$((-1-X))/" -e "s/DST-2/DST$((-2-X))/"`
if [[ -z $F ]]