내용으로 건너뛰기
권남
사용자 도구
로그인
사이트 도구
검색
도구
문서 보기
이전 판
역링크
최근 바뀜
미디어 관리자
사이트맵
로그인
>
최근 바뀜
미디어 관리자
사이트맵
추적:
linux:diff
이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요.
====== diff ====== * [[vim:vimdiff|vimdiff]] * [[http://linux.about.com/library/cmd/blcmdl1_sdiff.htm|sdiff]] * [[http://linux.about.com/library/cmd/blcmdl1_diff.htm|diff]] : colordiff 명령도 있음 * [[https://github.com/so-fancy/diff-so-fancy?ref=stackshare|Diff So Fancy]] ===== 더 좋은 diff ===== * https://github.com/so-fancy/diff-so-fancy * https://github.com/dandavison/delta ===== 파일 내용을 비교하여 중복건은 제외하고 출력하기 ===== * [[https://stackoverflow.com/questions/4366533/how-to-remove-the-lines-which-appear-on-file-b-from-another-file-a|linux - How to remove the lines which appear on file B from another file A? - Stack Overflow]] * 하나의 파일에 여러 내용이 있고, 거기서 제외시킬 내용을 한 줄마다 가진 파일이 있다고 할때, ''<origin>'', ''<lines-to-be-removed>'' <code sh> # 정렬 된 파일일 경우 comm -23 <origin> <lines-to-be-removed> join -v <origin> <lines-to-be-removed> # 정렬 무관 grep -Fvxf <lines-to-be-removed> <origin> awk 'NR==FNR{a[$0];next} !($0 in a)' <lines-to-be-removed> <origin> comm -23 <(sort <origin>) <(sort <lines-to-be-removed>) join -v 1 <(sort <origin>) <(sort <lines-to-be-removed>) diff <origin> <lines-to-be-removed> \ --new-line-format="" --old-line-format="%L" --unchanged-line-format="" </code> * [[linux:comm|comm]] * [[linux:grep|grep]] * [[linux:awk|awk]] * [[linux:join|join]]
linux/diff.txt
· 마지막으로 수정됨: 2022/12/19 16:41 저자
kwon37xi
문서 도구
문서 보기
이전 판
역링크
맨 위로