Re: format string: time for today, date for others.

2011-01-07 Thread du yang
On Fri, Jan 07, 2011 at 05:07 -0600, David Champion wrote: > * On 07 Jan 2011, Yue Wu wrote: > > On Fri, Jan 07, 2011 at 03:40:12PM +0800, du yang wrote: > > > > > > if [ $(date -d "$(date '+%Y-%m-%d')" "+%s") -gt $epoch ]; then > > > echo "%4C %Z %{%d.%m.%y} %-15.15F (%?l?%4l&%4c?) %?H?[%H]?%

Re: format string: time for today, date for others.

2011-01-07 Thread du yang
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 > > > > ==

Re: format string: time for today, date for others.

2011-01-07 Thread du yang
On Fri, Jan 07, 2011 at 05:29 -0600, David Champion wrote: > * On 07 Jan 2011, 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. > > ... > > if [ $(date -d "$(date '+%Y-%m-%d')"

Re: format string: time for today, date for others.

2011-01-07 Thread David Champion
* On 07 Jan 2011, 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. > ... > if [ $(date -d "$(date '+%Y-%m-%d')" "+%s") -gt $epoch ]; then > echo "%4C %Z %{%d.%m.%y} %-15.15F (%?l?%4l

Re: format string: time for today, date for others.

2011-01-07 Thread Yue Wu
On Fri, Jan 07, 2011 at 05:07:47AM -0600, David Champion wrote: > * On 07 Jan 2011, Yue Wu wrote: > > On Fri, Jan 07, 2011 at 03:40:12PM +0800, du yang wrote: > > > > > > if [ $(date -d "$(date '+%Y-%m-%d')" "+%s") -gt $epoch ]; then > > > echo "%4C %Z %{%d.%m.%y} %-15.15F (%?l?%4l&%4c?) %?H?[

Re: format string: time for today, date for others.

2011-01-07 Thread du yang
On Fri, Jan 07, 2011 at 18:54 +0800, Yue Wu wrote: > On Fri, Jan 07, 2011 at 06:32:44PM +0800, du yang wrote: > > > > Change '#!/bin/bash' to '#!/bin/sh' in the script header, then it may work. > > > > else please post the error details. > > > > I've tried it, but many messages like: > > u

Re: format string: time for today, date for others.

2011-01-07 Thread David Champion
* On 07 Jan 2011, Yue Wu wrote: > On Fri, Jan 07, 2011 at 03:40:12PM +0800, du yang wrote: > > > > 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?

Re: format string: time for today, date for others.

2011-01-07 Thread Yue Wu
On Fri, Jan 07, 2011 at 06:32:44PM +0800, du yang wrote: > > Change '#!/bin/bash' to '#!/bin/sh' in the script header, then it may work. > > else please post the error details. > I've tried it, but many messages like: usage: date [-jnu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdH

Re: format string: time for today, date for others.

2011-01-07 Thread du yang
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 > > > > ==

Re: format string: time for today, date for others.

2011-01-07 Thread Yue Wu
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 -

Re: format string: time for today, date for others.

2011-01-07 Thread Yue Wu
On Wed, Jan 05, 2011 at 04:32:44PM -0600, David Champion wrote: > * On 05 Jan 2011, Yue Wu wrote: > > Hi list, > > > > Is there a date/time string that show the time only for today's emails > > but date for else? So, in the index, the emails that got today will > > show the time only, but the one