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)
沒有留言:
張貼留言