去掉所有包含this或is的行

题目描述
写一个 bash脚本以实现一个需求,去掉输入中含有this的语句,把不含this的语句输出
示例:
假设输入如下:
that is your bag
is this your bag?
to the degree or extent indicated.
there was a court case resulting from this incident
welcome to nowcoder


你的脚本获取以上输入应当输出:
to the degree or extent indicated.
welcome to nowcoder

说明:
你可以不用在意输出的格式,包括空格和换行
grep -v -E "this|is" nowcoder.txt
awk -F: '$0!~/this|is/ {print $0}' nowcoder.txt
sed '/this|is/d' nowcoder.txt
原文地址:https://www.cnblogs.com/chenjo/p/14545555.html