Child pages
  • Error with octals in RHEL5 (due to bug fix)
Skip to end of metadata
Go to start of metadata

Description:

In RHEL5 several previous bugs were fixed. Among them the bug that integers preceded by zero were not properly recognised as

octal numbers.

Several people had in their scripts integers (e.g 8) as 08.

The advent of RHEL5 (bug fix) made these numbers octals and caused

scripts to fail when the octal number (e.g. 08) didn't exist or didn't have the correct meaning (e.g 017).

Work around:

  • Edit the file manually and strip the prefix zeros from the numbers
  • Execute the following python script:

If you use the bash shell:

source /uufs/chpc.utah.edu/sys/pkg/python/2.6.5/etc/python.sh

If you use tcsh shell:

source /uufs/chpc.utah.edu/sys/pkg/python/2.6.5/etc/python.csh

For all, excute the command (you need to download rmoct.py and run_rm.py)

python run_rm.py inputfile [outputfile]
  File Modified
File run_rm.py Aug 12, 2010 by Wim Cardoen
File rmoct.py Aug 12, 2010 by Wim Cardoen
  • No labels

1 Comment

  1. Contains details on this bug fix: http://dcs.nac.uci.edu/support/sysadmin/security/archive/msg04217.html

    • strings of numbers which began with the number "0", and which should have
      been interpreted as octal numbers by tcsh, were instead being interpreted
      as decimal numbers. In this updated package, tcsh correctly considers
      strings of digits starting with zero to be octal numbers.