laes_
asked on
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
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
egrep -i -v '(file created in|author|first statement)' file
ASKER
and with awk, could u tell me how?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ahoffmann,
its an exercice that the teacher gives us , she demands us to use awk and either tolower or toupper
its an exercice that the teacher gives us , she demands us to use awk and either tolower or toupper
man gawk
http:/help.jsp#hi56 homework
http:/help.jsp#hi130 homework
BTW, you initial code works if you use proper brackets ;-)
http:/help.jsp#hi56 homework
http:/help.jsp#hi130 homework
BTW, you initial code works if you use proper brackets ;-)
ASKER
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 }