The grep command is what you're looking for. Grep searches for lines that match a pattern, and prints those lines.
So for example, you don't like "=text" lines. Suppose your file is called xyz.txt, try this:
grep -v '=text' xyz.txt
As you will learn when you read the fabulous grep manpage with "man grep", the -v option tells grep to print lines that don't match the pattern. So in this case, it will print lines that don't have "=text" anywhere in them. Maybe you only want to match lines which have "=text" at the start, in which case we get a bit deeper into "regular expressions", by putting a caret to anchor the match to the start of the line:
grep -v '^=text' xyz.txt
To remove blank lines, you need to know that just like caret ^ matches the start of a line, dollar $ matches the end of a line. A blank line is a line where the start is right next to the end. So you can get rid of blank lines like this:
grep -v '^$' xyz.txt
Suppose you wanted to remove both the =text lines and blank lines, and put the result in a file called "answer.txt", you can use pipes and redirects and use grep twice, like this:
grep -v '^=text' xyz.txt | grep -v '^$' > answer.txt
See? Easy when you know how!