특정 파일에서 어떤 단어를 바꾸거나, 어떤 라인만 삭제
awk와 결합하여 사용하면 좋다
stream edit
- regex replace like lineinfile
nth line
stdout
another file
바로수정
use @ of /
sed 명령어 실행 시 "unknown option to `s'" error 가 생길 경우
쉘스크립트 sed 명령어 실행 시 "unknown option to `s'" error 가 생길 경우 라는 명령어를 사용하여 치환을 하려고 하니 sed: -e expression #1, char 16: unterminated 's command 라는 오류가 생기더라....(이런...) 5~6시간 동안 구글링을 하여 드디어 답을 찾았다 .....
https://m.blog.naver.com/oasiss12/221600130084

Replace smart quotes with the Linux sed command
In typography, a pair of quotation marks were traditionally oriented toward one another. They look like this: "smart quotes" As computers became popular in the mid-twentieth century, the orientation was often abandoned. The original character set of computers didn't have much room to spare, so it makes sense that two double-quotes and two single-quotes were reduced down to just one of each in the ASCII specification.
https://opensource.com/article/21/9/sed-replace-smart-quotes

Replace Strings Using Sed And Regex
Thanks for contributing an answer to Stack Overflow! Please be sure to answer the question. Provide details and share your research! Asking for help, clarification, or responding to other answers. Making statements based on opinion; back them up with references or personal experience. To learn more, see our tips on writing great answers.
https://stackoverflow.com/questions/14072592/replace-strings-using-sed-and-regex
알아두면 가끔은 유용할 리눅스 명령어
파일 끝부분 내용을 출력한 후 프로그램이 끝나는 것이 아니라, 그 이후 추가된 파일 내용을 계속 출력할 수도 있습니다. 저는 서버 로그 등을 모니터링하면서 새로 추가된 내용을 계속 확인하고자 할 때 사용합니다. (물론 너무 많은 내용이 지나가면 보기 힘들긴 하지만요ㅎㅎ) 위에서 설명드린 개개의 명령어들을 잘 사용하는 것도 도움이 되지만, 이것들을 엮어서...
https://sinjin0.medium.com/%EC%95%8C%EC%95%84%EB%91%90%EB%A9%B4-%EA%B0%80%EB%81%94%EC%9D%80-%EC%9C%A0%EC%9A%A9%ED%95%A0-%EB%A6%AC%EB%88%85%EC%8A%A4-%EB%AA%85%EB%A0%B9%EC%96%B4-f46eb08eba1f

