Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2005
    Posts
    41

    Unanswered: How do I convert a character to a numeric value ?

    How do I convert 0000002 to a 2 or a numeric value / integer

  2. #2
    Join Date
    May 2007
    Location
    Milano, Italy
    Posts
    22
    Code:
    printf "%d\n" 0000002

  3. #3
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    Do some mathematical calculations like adding 0:
    Code:
    echo $[0000002 + 0]
    Knut Stolze
    IBM DB2 Analytics Accelerator
    IBM Germany Research & Development

Posting Permissions

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