我怎么发现所有不包含这个词的行:“_ 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 _archive 10
XXXXXXXXXXXXXXXXXXXXXXXXX _archive 11
XXXXXXXXXXXXXXXXXXXXXXXX teste 5
由于
答案 0 :(得分:3)
使用grep -v
:
grep -v _archive inputfile.txt
此命令打印出inputfile.txt
中不包含_archive
的每一行。
答案 1 :(得分:0)
假设您的文件位于“file.txt”
下以下unix命令会这样做
grep -v _archive file.txt