Prepend the string “10#” to the front of your variables. That forces bash to treat them as decimal, even though the leading zero would normally make them octal.
More Related Contents:
- How can I check if a program exists from a Bash script?
- How can I compare numbers in Bash?
- echo “#!” fails — “event not found”
- Pipe output and capture exit status in Bash
- Redirect stderr and stdout in Bash [duplicate]
- Which characters need to be escaped when using Bash?
- How to detect if a script is being sourced
- bash : Illegal number
- Shell redirection i/o order
- Loop through all the files with a specific extension
- Passing arguments with spaces between (bash) script
- How to apply shell command to each line of a command output?
- What do double-asterisk (**) wildcards mean?
- How to split strings over multiple lines in Bash?
- Creating a string variable name from the value of another string
- Passing arguments by reference
- How to limit number of threads/sub-processes used in a function in bash
- Using case for a range of numbers in Bash
- How to run some command before or after every Bash command entered from console?
- How do I remove all .pyc files from a project?
- Sorting strings with numbers in Bash [duplicate]
- Get current directory or folder name (without the full path)
- What does the double-asterisk (**) wildcard mean?
- How can I print each command before executing? [duplicate]
- Using cut command to remove multiple columns
- How to send control+c from a bash script?
- Using Bash to display a progress indicator (spinner) [duplicate]
- Can parameter expansion be nested in Bash? [duplicate]
- How to properly nest Bash backticks
- How to add path with space in Bash variable