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... >
Change '#!/bin/bash' to '#!/bin/sh' in the script header, then it may work. else please post the error details. -- oooO::::::::: (..)::::::::: :\.(:::Oooo:: ::\_)::(..):: :::::::)./::: ::::::(_/::::