Grep huge number of patterns from huge file
I have a file that’s growing about 200,000 lines a day, and it is all formed with blocks of three lines as such:
I have a file that’s growing about 200,000 lines a day, and it is all formed with blocks of three lines as such:
I created a text file and put some email addresses in it. Then I used grep to find them. Indeed it worked:
grep -c is useful for finding how many times a string occurs in a file, but it only counts each occurence once per line. How to count multiple occurences per line?
Assuming that the grep tool should be used, I’d like to search for the text string “800×600” throughout the entire file system.
I have a script that generates some output. I want to check that output for any IP address like
I’m parsing a mailbox file that stores e-mail server reports for unsuccessfully delivered e-mail. I wish to extract bad e-mail addresses, so that I remove them from the system. The log file looks like this:
I would like to list the files recursively and uniquely that contain the given word.
I have a file which is having following content: zdk aaa b12 cdn dke kdn Input1: aaa and cdn Output 1: aaa b12 cdn Input 2: zdk and dke Output 2: zdk aaa b12 cdn dke I could use below commands to achieve: grep -a aaa -A2 file # Output 1 grep -a aaa -A4 … Read more
Using the top command with redirection works fine:
Given this minimal example