Doing a modulo in /bin/sh??

2005-08-31 Thread Gary Kline
I can grab the results of w=$date+%U); in C an use the modulo operator; is there a way to do this is /bin/sh? ot zsh? tia, guys, gary #/bin/sh w=$(date +%U) echo w is $w; (even=$(w % 2 )); ## flubs. echo even is $even; ## flubs. if [ $even -eq 0 ]

Re: Doing a modulo in /bin/sh??

2005-08-31 Thread Philip Hallstrom
I can grab the results of w=$date+%U); in C an use the modulo operator; is there a way to do this is /bin/sh? ot zsh? tia, guys, gary #/bin/sh w=$(date +%U) echo w is $w; (even=$(w % 2 )); ## flubs. echo even is $even; ## flubs. if [ $even -eq 0 ]

Re: Doing a modulo in /bin/sh??

2005-08-31 Thread Gary Kline
On Wed, Aug 31, 2005 at 11:18:57AM -0700, Philip Hallstrom wrote: I can grab the results of w=$date+%U); in C an use the modulo operator; is there a way to do this is /bin/sh? ot zsh? tia, guys, gary #/bin/sh w=$(date +%U) echo w is $w; (even=$(w % 2 )); ##

Re: Doing a modulo in /bin/sh??

2005-08-31 Thread Dan Nelson
In the last episode (Aug 31), Gary Kline said: I can grab the results of w=$date+%U); in C an use the modulo operator; is there a way to do this is /bin/sh? ot zsh? #/bin/sh w=$(date +%U) echo w is $w; (even=$(w % 2 )); ## flubs. echo even is $even; ## flubs.

Re: Doing a modulo in /bin/sh??

2005-08-31 Thread Dan Nelson
In the last episode (Aug 31), Dan Nelson said: In the last episode (Aug 31), Gary Kline said: I can grab the results of w=$date+%U); in C an use the modulo operator; is there a way to do this is /bin/sh? ot zsh? #/bin/sh w=$(date +%U) echo w is $w; (even=$(w % 2 )); ##

Re: Doing a modulo in /bin/sh??

2005-08-31 Thread Gary Kline
On Wed, Aug 31, 2005 at 01:42:05PM -0500, Dan Nelson wrote: In the last episode (Aug 31), Gary Kline said: I can grab the results of w=$date+%U); in C an use the modulo operator; is there a way to do this is /bin/sh? ot zsh? #/bin/sh w=$(date +%U) echo w is $w; (even=$(w %