linux sed 명령 으로 특수 문자 삭제 (사선, 콜론 등 전의 문자 포함)
sed , 。
, , “ ”(pattern space)。
sed , , 。
Sed ; ; 。
sed 용법
sed , , 。
1、 file abc :
sed '/abc/d' file
,
sed '/abc/d' file > output_file
2、 file , , “/”
, sed 。
file , “a/b/Makefile:106:” 。
sed "/a\/b\/Makefile:106: warning:/d" file
a\ /b , “\" ,"\ /" , “/” 。
,“/a\ /b\ /Makefile:106:”, , “a/b/Makefile:106:”
3、
#cat source_file.txt
test for sed
a/b/Makefile:106: warning:11111
line3
a/b/Makefile:106: warning:222222
line5
end
sed , “a/b/Makefile:106:” 。
#sed "/a\/b\/Makefile:106: warning:/d" source_file.txt
test for sed
line3
line5
end
, 。
sed "/a\/b\/Makefile:106: warning:/d" source_file.txt > output.txt
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
바이너리 파일cat 또는tail, 터미널 디코딩 시 처리 방법cat으로 바이너리 파일을 보려고 할 때 코드가 엉망이 되어 식은땀이 났다. 웹에서 스크롤된 정보의 처리 방법과alias의 설정을 요약합니다. reset 명령을 사용하여 터미널을 재설정합니다.이렇게 하면 고치지 못하...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.