an hour less in 24 hour system
My program:
__________________________________
#!/bin/ksh
DAY=`date +%y%m%d`
H=`date +%H`
M=`date +%M`
day=`date +%m/%d/%y`
let h=$H-1
echo DAY $DAY
echo H $H
echo M $M
echo day $day
echo h $h
_____________________________________
My result:
______________________________________
DAY 061023
H 09
M 38
day 10/23/06
h 8
_______________________________________
My need help:
on the "let h=$H-1" I have the result of number 8; how can I make it 08 ( have the zero in front of 8)
please help
|