On Wed, Jul 21, 2004 at 05:49:48PM -0400, Jon LaBadie wrote: > In a 'real' bourne shell $(...) is not available, but `...` is.
And I was so sure it was the other way around... This was pointed out to me offlist by someone else, too. Ah, well. I actually wrote it using `...` first, but nesting them confused the shell, so I changed it to something where the begin/end delimiters were different. > However this can be simplified if you are working in a > posix-compatible shell. The math operators ((...)) provide > a return code of 0 or 1 depending on the zero/non-zero value > of the result. So you could do (ignoring cron required escapes) > > (( $(date +%U) % 2 )) && ... Very nice! Thanks!
