gpt4 book ai didi

linux - xxd 只输出二进制

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:30:00 27 4
gpt4 key购买 nike

使用命令:

xxd -b some_text

将输出二进制表示和原始文本:

000054c: 11101111 10100001 10110110 00010000 01011011 10000110  ....[.
0000552: 01111000 11001000 01010101 11000101 11101111 10101111 x.U...
0000558: 10010111 11101010 00011001 01010100 10101010 10001110 ...T..

我怎样才能让实用程序只输出二进制文件而不输出任何其他内容?

最佳答案

如果您只需要二进制文件,甚至不需要偏移量,您可以扩展 Thomas Dickey 的 sed 单行代码来去除偏移量:

xxd -b some_text | sed -e 's/^.*: //; s/[[:space:]][[:space:]]*.\{6,6\}$//'

关于linux - xxd 只输出二进制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28933801/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com