How i find all lines not containing this word: "_archive" ???
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 1
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 2
XXXXXXXXXXXXXXXXXXXXXXXXX teste 1
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 3
XXXXXXXXXXXXXXXXXXXXXXXXX teste 2
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 4
XXXXXXXXXXXXXXXXXXXXXXXXX teste 3
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 5
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 6
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 7
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 8
XXXXXXXXXXXXXXXXXXXXXXXXX teste 4
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 9
XXXXXXXXXXXXXXXXXXXXXXXXX _archi开发者_运维知识库ve 10
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 11
XXXXXXXXXXXXXXXXXXXXXXXX teste 5
Thanks
Use grep -v
:
grep -v _archive inputfile.txt
This command prints out each line in inputfile.txt
that does not contain _archive
.
suppose your file is under "file.txt"
the following unix command would do it
grep -v _archive file.txt
精彩评论