The shell can not call the third party command, indicating different hex data. The following representations are summarized here. The default value of a shell script is handled by a decimal number, unless the number begins with a special notation or prefix. It can represent other hex type values. For example, starting with 0 is octal. Starting with 0x is a hexadecimal number. Using BASE#NUMBER this form can represent other hexadecimal .BASE values: 2-64.
How to use:
Hexadecimal to decimal:
[chengmo@centos5 ~]$ ((num =0123));[chengmo@centos5 ~]$ echo $num;83
[chengmo@centos5 ~]$ ((num=8#123));[chengmo@centos5 ~]$ echo $num ; 83
((expression)), (()) can be any data expression. If you add in the previous: & rdquo; $ & rdquo; you can read the calculation results.
Hexadecimal to decimal:
[chengmo@centos5 ~]$ ((num=0xff)); [chengmo@centos5 ~]$ echo $num; 255[chengmo@centos5 ~]$ ((num=16#ff));[chengmo@centos5 ~]$ echo $num; 255
base-32 to decimal:
[chengmo@centos5 ~]$ ((num=32#ffff));[chengmo@centos5 ~]$ echo $num; 507375
base64 to decimal:
[chengmo@centos5 ~]$ ((num=64 #abc_)); [chengmo@centos5 ~]$ echo $num; 2667327
Binary to Decimal
[chengmo@centos5 ~]$ ((num=2#11111111)); [ ,null,null,3],Chengmo@centos5 ~]$ echo $num;255
decimal to octal
This is used to: bc external command completion. The bc command format is converted to: echo "obase=ade; value"
First install CentOS6 to install rp-pppoe this software, the previous version of centos is installed
For beginners, the learning of Linux commands is not so simple. Many beginners rarely use commands o
OpvnVPN Chinese full name: virtual private network. It is a private private network technology that
Here is a way for you to quickly find a large file in the system. Recently received a users report,
Linux has gone through 20 years, and the future will be better.
Virtualization bears the brunt: Linux's top ten common uses
CentOS minimizes installation and then installs desktop and Chinese support
Executing commands in Linux; the difference between &&
Unexpected administrator Linux management integration security
CentOS 6.2 source code compilation and installation Nginx+MySQL+PHP+WordPress installation Word
KVM Basic Principles and Architecture II - Basic Principles
How to install varish as a cache and proxy
Implementing Nagios Service on Centos
Win7 system kills the extra notification list icon method
Essential information 103 Windows XP Run Commands
Computer windows system virtual memory is too low solution
Win10 10525 preview can not be activated official solution
Win XP Recycle Bin cannot be cleared. Solution
WinXP control panel font program error how to solve
The printer encountered a "deleting" or "printing" unresponsive solution.