리눅스 sed 헥스 변경

Jmnote (토론 | 기여)님의 2020년 7월 11일 (토) 15:04 판 (→‎실습)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
sed replace with hex
sed 헥스 변경

1 실습[ | ]

[root@zetawiki ~]# echo hello > greet.txt
[root@zetawiki ~]# cat greet.txt
hello
[root@zetawiki ~]# hexdump greet.txt
0000000 6568 6c6c 0a6f                         
0000006
[root@zetawiki ~]# sed 's/\x68\x65/AB/g' greet.txt
ABllo
[root@zetawiki ~]# sed -i 's/\x68\x65/AB/g' greet.txt
[root@zetawiki ~]# cat greet.txt
ABllo

2 같이 보기[ | ]

3 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}