On Fri, Jan 07, 2011 at 18:21 +0800, Yue Wu wrote:
> On Fri, Jan 07, 2011 at 03:40:12PM +0800, du yang wrote:
> > Hi,
> > 
> > I improved the script to fulfill the author's the expectation(just display 
> > time for today's mails),
> > only 'if condition' changed.
> > 
> > - du yang
> > 
> > ============================
> > #!/bin/bash
> > 
> > epoch="$1"
> > 
> > if [ $(date -d "$(date '+%Y-%m-%d')" "+%s") -gt $epoch ]; then
> >      echo "%4C %Z %{%d.%m.%y} %-15.15F (%?l?%4l&%4c?) %?H?[%H]?%s%"         
> >                       
> > else                                                                        
> >                      
> >      echo "%4C %Z %{   %H:%M} %-15.15F (%?l?%4l&%4c?) %?H?[%H]?%s%"         
> >                       
> > fi
> 
> Must it be bash script? No bash here, it fails the test with sh...
> 

you can first test it like this,
# ./format_date.sh 1294329609

-- 
oooO:::::::::
(..):::::::::
:\.(:::Oooo::
::\_)::(..)::
:::::::)./:::
::::::(_/::::

Reply via email to