Reputation: 2585
I wanted to print all lines from a file containing "FAIL**". I don't wanted any lines with FAILED or FAILURE to be printed. How do I do this? I want to the output to go into another file.
The lines end with this string.
Upvotes: 0
Views: 5734
Reputation: 174696
Your command should be,
grep 'FAIL\*\*$' file
Escape the * chracter to make your grep command to work.
Example:
$ cat file
avi
la FAIL**
FAIL
foo FAIL**
bar FAIL**
$ grep 'FAIL\*\*$' file
la FAIL**
foo FAIL**
bar FAIL**
Upvotes: 1