Redian新闻
>
如何用16进制查找替换文件中的字符?
avatar
如何用16进制查找替换文件中的字符?# Unix - 噫吁兮,危乎高哉
f*y
1
如何用16进制查找替换文件中的字符?
16进制字符在unix shell里如何表示?
比如 sed 's/0x01/0x10/', 要用0x10替换0x01怎么做?
avatar
f*y
2
awk也可以,帮个忙吧?

【在 f****y 的大作中提到】
: 如何用16进制查找替换文件中的字符?
: 16进制字符在unix shell里如何表示?
: 比如 sed 's/0x01/0x10/', 要用0x10替换0x01怎么做?

avatar
N*r
3
from bash manual page, `Quoting' section:
Words of the form $'string' are treated specially. The word expands to
string, with backslash-escaped characters replaced as specifed by the
ANSI C standard. Backslash escape sequences, if present, are decoded
as follows:
\a alert (bell)
\b backspace
\e an escape character
\f form feed
\n new line
\r carriage retur

【在 f****y 的大作中提到】
: 如何用16进制查找替换文件中的字符?
: 16进制字符在unix shell里如何表示?
: 比如 sed 's/0x01/0x10/', 要用0x10替换0x01怎么做?

avatar
f*y
4
你的意思是 sed 's/\x01/\x10/' ?
如果可以我就不用问了。还请明示.

【在 N*********r 的大作中提到】
: from bash manual page, `Quoting' section:
: Words of the form $'string' are treated specially. The word expands to
: string, with backslash-escaped characters replaced as specifed by the
: ANSI C standard. Backslash escape sequences, if present, are decoded
: as follows:
: \a alert (bell)
: \b backspace
: \e an escape character
: \f form feed
: \n new line

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。