似乎获得了默认格式:
hexdump -e '"%07.7_Ax\n"' -e '"%07.7_ax " 8/2 "%04x " "\n"'
Run Code Online (Sandbox Code Playgroud)
来自man hexdump
:
Implement the -x option:
"%07.7_Ax\n"
"%07.7_ax " 8/2 "%04x " "\n"
Run Code Online (Sandbox Code Playgroud)
如果你想了解它hexdump
的格式,你将不得不阅读手册,但这里只是简单介绍以前的格式:
第一部分%07.7_Ax\n
是显示仅包含偏移量的最后一行的部分.根据手册:
_a[dox] Display the input offset, cumulative across input files, of the
next byte to be displayed. The appended characters d, o, and x
specify the display base as decimal, octal or hexadecimal
respectively.
_A[dox] Identical to the _a conversion string except that it is only
performed once, when all of the input data has been processed.
Run Code Online (Sandbox Code Playgroud)"%07.7_ax "
部分.所述8/2
装置8次迭代和2个字节用于以下,即,"%04x "
.最后,在这之后,我们有一个新行:"\n"
.我不太确定你想要21个字节,也许这样做:
hexdump -e '"%07.7_Ax\n"' -e '"%07.7_ax " 21/1 "%02x " "\n"'
Run Code Online (Sandbox Code Playgroud)
如果需要,你知道如何摆脱偏移量:
hexdump -e '21/1 "%02x " "\n"'
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3857 次 |
最近记录: |