Today I realised, that ash of Red Hat Linux SuX0r more than I could expect: This works fine in my Debian GNU/Linux 2.2 (Potato): #!/bin/ash BEATHOUR=$(date -u +%H) BEATHOUR=$(( ${BEATHOUR} + 1 )) But In Red Hat Linux 6.2 I needed to hack it like this: #!/bin/ash BEATHOUR=$(date -u +%k | sed 's/\ //') if test "${BEATHOUR}" = "0" then BEATHOUR=1 else BEATHOUR=$((${BEATHOUR}+1)) fi
"ash" is buggy because it's obsolete. The above script works perfectly with ash-0.3.7 This bug is a DUPLICATE of the bug 15957: http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=15957 Please mark it as such.
*** This bug has been marked as a duplicate of 15957 ***