Hello,
I have a file which has user information. Each user has 2 variables with the same name like
Email: testuser1
Email: testuser1@test.com
Email: testuser2
Email: testuser2@test.com
My intention is to delete the ones without the '@' symbol. When I run this statement awk '/^Email:/&&!/@/' <FileName>. It prints all the Email variable without the @. But when I try to run this one expecting to print all the lines except Email without @. it prints everything.
awk '/cn:/&&!/@/ { copy=1 }; copy { print } ' <filename>
Please advise.
-Regards,