linux and robert
2011年12月16日 星期五
bash, convert integer to ascii char
# convert integer to ascii char
chr() {
printf \\$(printf '%03o' $1)
}
for example,
echo `chr 0x61` ---> a
Ref:
http://ubuntuforums.org/showthread.php?t=735140
較新的文章
較舊的文章
首頁
訂閱:
文章 (Atom)