discard some lines from file

i want discard some lines from file, despite of the case sensitive

so let's take as example
these 3 terms
"file created in"
"author"
and
"first statement"
these lines can contain other things than this expression
so how have i to do to change the file and let only lines which don't contain theses expression with awk program

thanks for ur help


LVL 2
laes_Asked:
Who is Participating?
 
ahoffmannConnect With a Mentor Commented:
awk '/[AaUuTtHhOoRr]/{next}/[FfIiLlEe CcRrEeAaTtEeDd IiNn]/{next}{print}' file
0
 
laes_Author Commented:

a have tried this, but i don't know why i it doesn't work!?

tolower($0) !~ /^*file created in*/ && tolower($0) !~ /^*first statement*/  && tolower($0) !~ /^*author*/ { print }
0
 
ahoffmannCommented:
egrep -i -v '(file created in|author|first statement)' file
0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
laes_Author Commented:
and with awk, could u tell me how?
0
 
laes_Author Commented:
ahoffmann,
its an exercice that the teacher gives us , she demands us to use awk and either tolower or toupper



0
 
ahoffmannCommented:
man gawk

http:/help.jsp#hi56 homework
http:/help.jsp#hi130 homework

BTW, you initial code works if you use proper brackets ;-)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.