This doesn't appear to be a MySQL issue so unless you object I'll move it to the Unix forum. You want to be looking at the grep command though. You haven't given any examples of what text you want to look for so I can't be any more specific than:
Code:
grep "Error" MyOriginalFile.txt > JustTheErrors.txt
You'd run this command at the linux command prompt.
Mike