- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Strange sh Behavior
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2006 03:55 AM
06-20-2006 03:55 AM
# echo $(( 00 ))
0
# echo $(( 01 ))
1
# echo $(( 02 ))
2
# echo $(( 03 ))
3
# echo $(( 04 ))
4
# echo $(( 05 ))
5
# echo $(( 06 ))
6
# echo $(( 07 ))
7
# echo $(( 08 ))
sh: 08 : The specified number is not valid for this command.
# echo $(( 09 ))
sh: 09 : The specified number is not valid for this command.
# echo $(( 10 ))
10
# echo $(( 11 ))
11
ksh does not exhibit this behavior.
PCS
Solved! Go to Solution.
- Tags:
- octal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2006 03:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2006 04:00 AM
06-20-2006 04:00 AM
Re: Strange sh Behavior
Thank you!
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2006 04:04 AM
06-20-2006 04:04 AM
Re: Strange sh Behavior
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-20-2006 09:26 AM
06-20-2006 09:26 AM
Re: Strange sh Behavior
>A leading zero (0) in the a shell script specifies OCTAL values
You can solve this by specifying the base:
echo $(( 10#08 ))
- Tags:
- base