"리눅스 sed 헥스 변경"의 두 판 사이의 차이

 
4번째 줄: 4번째 줄:
==실습==
==실습==
<source lang='console'>
<source lang='console'>
[root@zetawiki ~]# echo hello > greet.txt
[root@zetawiki ~]# cat greet.txt
[root@zetawiki ~]# cat greet.txt
hello
hello

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 }}