SHELL中的2进制、10进制、8进制、16进制之间的转换
May042010
作者:2hei 发布:2010-05-04 16:00 分类:linux, OpenSource, shell 阅读:7,252 views SHELL中的2进制、10进制、8进制、16进制之间的转换已关闭评论
一、16进制转换成10进制
printf %d 0xF
15
或者
echo $((16#F))
15
二、10进制转换成16进制
printf %x 15
f
或者
echo “obase=16;15″|bc
F
三、10进制转换成8进制
printf %o 9
11
四、8进制转换成10进制
echo $((8#11))
9
五、同理二进制转换成10进制
echo $((2#111))
7
六、10进制转换成二进制
echo “obase=2;15″|bc
1111
本文固定链接: https://2hei.net/shell_convert_2_8_10_16.html | 二黑的站点
该日志由 2hei 于2010年05月04日发表在 linux, OpenSource, shell 分类下,
原创文章转载请注明: SHELL中的2进制、10进制、8进制、16进制之间的转换 | 二黑的站点
原创文章转载请注明: SHELL中的2进制、10进制、8进制、16进制之间的转换 | 二黑的站点
您可能还会对这些文章感兴趣!
- China 省份,城市三级联动数据库
- xenconsole: Could not read tty from store: No such file or directory
- shell 的变量作用域
- kernel panic – not syncing: 的思考(2)
- eclipse+pydev搭建python开发环境
- svn: Can’t convert string from native encoding to UTF-8(1)
- Code review 工具gerrit之体验
- 当SecureCRT异常关闭后,后台进程一同关闭的现象罪魁祸首 Signup信号(1)
- linux下使用uuencode/mutt发送带附件的邮件(1)
- resin3使用的一些体会
- finding netcard driver type in linux(1)
- bash: vim: command not found 的解决办法
报歉!评论已关闭.
最新文章
- apache mod_python psp
- Connect to Dell iDRAC6 virtual console
- 使用rrdtoo resize修改已有rrd文件的数据量
- MAC下修改被HP打印机占用的8080端口
- mark: info.3g.qq 宕机
- mark:现在douban.com 豆瓣挂了
- postfix删除mail中的邮件列表
- Mozilla making progress with Firefox’s long journey to multiprocess
- munin监控jmx
- All of Wikipedia can be installed to your desktop in just 30 hours
- Winamp lovers beg AOL to open source code
- Microsoft brings rich node.js support to Visual Studio
- New backdoor worm found attacking websites running Apache Tomcat
- GitHub resets user passwords following rash of account hijack attacks
- Stability first: Ubuntu’s Mir won’t replace X in 14.04 desktop
- lvs ksoftirqd进程占用大量CPU
- monit 一个小巧的linux下监控/故障恢复工具
- nrpe Error: Could not complete SSL handshake. 5
- Canonical “abused trademark law” to target a site critical of Ubuntu privacy
- nagios check_udp 就是一残废
热门文章
- Linux Keyboard shortcut keys - 72,712 views
- mvnforum-1.0.0-rc3+resin+oracle9i下搭建 - 32,154 views
- linux下支持https的压力测试工具 - 19,761 views
- mark: info.3g.qq 宕机 - 17,180 views
- Cacti网络监控软件的安装、配置与使用连载 (2) — By 2hei - 16,193 views
- mark:现在douban.com 豆瓣挂了 - 13,353 views
- New backdoor worm found attacking websites running Apache Tomcat - 13,068 views
- nginx代理模式下,伪造X-Forwarded-For头的测试 - 11,636 views
- Code review 工具gerrit之体验 - 11,184 views
- 关于 - 10,579 views
标签云
alexa
apache
bash
BeautifulSoup
chm
discuz
django
dosevasive
driver
E63
EC2
facebooke
fastdfs
football
freebsd
google
hadoop
hbase
IaaS
java
jvm
kernel
linux
lua
mac
memcached
microsoft's bug
mod_deflate
mod_expires
mt install
mysql
nagios
nginx
openssh
oracle
php
python
R710
resin
rrdtool
shell
siege
ubuntu
vnc
xen
文章分类
- c (5)
- cloud (3)
- database (9)
- dfs (1)
- English (5)
- git (1)
- hbase (2)
- IaaS (2)
- IT (5)
- java (17)
- linux (22)
- live (9)
- nginx (8)
- OpenSource (123)
- other (4)
- others (113)
- php (2)
- python (23)
- resin (17)
- security (4)
- shell (7)
- ubuntu (1)
文章归档
- 2014年2月
- 2013年12月
- 2013年11月
- 2013年10月
- 2013年9月
- 2013年6月
- 2013年5月
- 2013年4月
- 2013年1月
- 2012年9月
- 2012年8月
- 2012年7月
- 2012年5月
- 2011年12月
- 2011年11月
- 2011年10月
- 2011年9月
- 2011年8月
- 2011年7月
- 2011年6月
- 2011年2月
- 2011年1月
- 2010年12月
- 2010年11月
- 2010年10月
- 2010年9月
- 2010年8月
- 2010年7月
- 2010年6月
- 2010年5月
- 2010年4月
- 2010年3月
- 2010年2月
- 2010年1月
- 2009年12月
- 2009年11月
- 2009年9月
- 2009年8月
- 2009年7月
- 2009年5月
- 2009年4月
- 2009年3月
- 2009年2月
- 2008年12月
- 2008年11月
- 2008年10月
- 2008年9月
- 2008年8月
- 2008年7月
- 2008年6月
- 2008年5月
- 2008年4月
- 2008年3月
- 2008年2月
- 2008年1月
- 2007年12月
- 2007年11月
- 2007年10月
- 2007年9月
- 2007年7月
- 2007年6月
- 2007年5月
- 2007年4月
- 2007年3月
- 2007年2月
- 2007年1月
- 2006年12月
最新评论
- 2hei发表在《mark: info.3g.qq 宕机》
- 2hei发表在《mark:现在douban.com 豆瓣挂了》
- 糖糖发表在《换掉Movable Type,启用Worldpress》
- free movie download发表在《sftp get “Connection closed”》
- Emory发表在《nginx代理模式下,伪造X-Forwarded-For头的测试》
- Juegos发表在《pdf and postscript》
- educational grants发表在《some Java decompilers — 一些java反编译工具》
- opthamologists发表在《[notice] child pid 19818 exit signal Bus error (7)》
- irie insurance发表在《linux下支持https的压力测试工具》
- registered nurse发表在《linux下支持https的压力测试工具》
最新日志热评日志随机日志
- apache mod_python psp
- Connect to Dell iDRAC6 virtual console
- 使用rrdtoo resize修改已有rrd文件的数据量
- MAC下修改被HP打印机占用的8080端口
- mark: info.3g.qq 宕机
- mark:现在douban.com 豆瓣挂了
- postfix删除mail中的邮件列表
- Mozilla making progress with Firefox’s long journey to multiprocess
- munin监控jmx
- All of Wikipedia can be installed to your desktop in just 30 hours
最新评论
糖糖:
埃母梯,是剁么的回晃;埃母梯,是free movie download:
i like it sftp iEmory:
It is very diffiJuegos:
I was surfing loeducational grants:
Thanks for an idopthamologists:
Thanks for someirie insurance:
Great writing! Iregistered nurse:
Wow this is a grliumingzhu:
🙂physical therapist:
It’s really a ni
标签云集
博客统计
- 日志总数:340 篇
- 评论总数:69 篇
- 标签数量:151 个
- 链接总数:0 个
- 建站日期:
- 运行天数:19511 天
- 最后更新:2017-9-18
最活跃的读者