Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- IntelliJ
- 맛집
- 게임
- 이마트트레이더스
- Linux
- OSX
- 구글
- game
- 아이폰
- PERL
- Python
- 요리
- Ingress
- 설치
- 인그레스
- 포탈
- 필드
- 성과
- 유튜브
- 프렌즈런
- 맥북
- Installation
- arduino
- Java
- Mac
- 카카오
- 클리어
- 닌텐도스위치
- Today
- 352
- Total
- 2,398,276
준호씨의 블로그
How to subtract two files using grep 본문
반응형
fileA
a
b
c
10
20
30
fileB
b
c
d
30
fileA - fileB
$ grep -F -x -v -f fileB fileA
1
10
20
shorter way
$ grep -Fxvf fileB fileA
1
10
20
man grep
...
-F, --fixed-strings
Interpret pattern as a set of fixed strings (i.e. force grep to behave as fgrep).
-f file, --file=file
Read one or more newline separated patterns from file. Empty pattern lines match every input line. Newlines are not considered
part of a pattern. If file is empty, nothing is matched.
...
-v, --invert-match
Selected lines are those not matching any of the specified patterns.
...
-x, --line-regexp
Only input lines selected against an entire fixed string or regular expression are considered to be matching lines.
...
반응형
'개발이야기' 카테고리의 다른 글
perl - 터미널에서 module 설치 여부 확인 하기 (0) | 2017.05.22 |
---|---|
perl - encode json (0) | 2017.05.21 |
How to subtract two files using grep (0) | 2017.05.18 |
python - Number to String. String-Number concatenation (0) | 2017.05.11 |
tcping - check a specific port is open (0) | 2017.04.30 |
SPF should written in TXT Record (not SPF Record) (0) | 2017.04.24 |
0 Comments