如題,如果我有個LOG檔如下:
write(4, "\240", 1) = 1
read(4, "_", 1) = 1
write(4, "\n", 1) = 1
read(4, "\365", 1) = 1
write(4, "P", 1) = 1
read(4, "\257", 1) = 1
write(4, "\5", 1) = 1
read(4, "\372", 1) = 1
write(4, "\375", 1) = 1
read(4, "\375", 1) = 1
read(4, "e\200", 2) = 2
那我能夠用Shell Script去把裡面的8進位跟ASCII轉換成16進位嗎?
我有試著研究了sed跟awk....不過感覺好像沒辦法做到?(或是我功力太淺了)
另外順便再問一下,為何我用strace去抓出來的東西都是用8進位顯示呀?
然後128以下的就顯示成ASCII,這樣真的有夠難讀的耶,
好像也沒看到參數可以改成16進位,而且好像8進位在LINUX很常看到,
這是為何呀?