Find the answer to your Linux question:
Results 1 to 3 of 3
Good Morning Team, I have a bash problem which is driving me nuts, it give the above error when run, I have cut out the section it is in a ...
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    5

    Unhappy Value too great for base Error Token is "09"

    Good Morning Team,
    I have a bash problem which is driving me nuts, it give the above error when run, I have cut out the section it is in a while function, I hope someone can help..

    while getopts ":op:efDb:" ARG
    do
    case $ARG in
    D)
    DEBUG=-D
    ;;
    b)
    BACKDIR=$OPTARG
    ;;
    f)
    FULL=-f
    ;;
    e)
    DATE=$(( $(date +%d) % 2))
    if [[ $DATE -ne 0 ]] ; then
    exit 0
    fi
    ;;
    o)
    DATE=$(( $(date +%d) % 2))
    if [[ $DATE -ne 1 ]] ; then
    exit 0
    fi
    ;;
    p)
    PORT=$OPTARG
    ;;
    *)
    usage
    exit 1
    ;;
    esac
    done

    All the best and thanks from Alan

  2. #2
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    Welcome to the forum.

    A convention in many situations is that numeric strings with a leading "0" are interpreted as octal. I suggest using "e":
    %d day of month (01..31)

    %e day of month, blank padded ( 1..31)

    -- excerpt from man date
    Doing a Google for Value too great for base Error Token is "09" produces almost 50K hits ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  3. #3
    Just Joined!
    Join Date
    Jul 2008
    Posts
    5

    Talking

    Hi, and thank you for the welcome.

    That solved the problem perfectly

    Thank you for your help..

    All the best from Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...