I have written a code that matches the occurrence of the words like Error / Fatal etc from a log file and printing it to a temporary file.
However, the problem is that the words can occur more than once in a line like " ERROR - Critical error" or something like FATAL - Fatal error and this causes the lines to get printed more than once because of the patterns getting repeated more than once.Can someone help me in suggesting a way to print the lines only once per occurrence in a line with an example?
Regards,Jay
In reply to Print line from file only once even if occurrence of pattern is more than once in the line by jayu_rao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |