scripts/common.sh: cleanup

* simplify version number/comments retrieving.
awk alone is enough, gred and sed are useless here
* use arithmetic expansion appropriately
[ int != int ] is not ok since it uses old broken posix test command "[" and string equal operator
it's safer/more readable to use arithmetic expansion to increment integer
scripts/generateAllDocumentation.sh: cleanup

* remove duplicate shell function run_cmd
* replace old broken posix test command "[" by the shiny ksh-style test command "[["