Sam Saha wrote:I have a log file which contains a big text lines. I wanted to keep the important lines and remove the unwanted lines from the big text file.
... ... ...
I wanted the output to be like this:
From the shell prompt (console), you can use simple
grep command like this: (assumed the log file is "server.log" )
It will filter out all the lines with "at " strings, hence results to your expected text.
To write the output text to a new logfile (says, it's "newfile.log"), simply add like following:
We can also achieve the expected result with
sed, awk, perl, vim, ... but I think
grep is simple enough :-)