Top "Grep" questions

grep is a command-line text-search utility originally written for Unix.

Using grep to search for a string that has a dot in it

I am trying to search for a string 0.49 (with dot) using the command grep -r "0.49" * But what happening is that …

linux grep
grep --ignore-case --only

grep fails when using both --ignore-case and --only-match options. Example: $ echo "abc" | grep -io abc abc $ echo "ABC" | grep -io …

regex bash unix grep gnu
How can I have grep not print out 'No such file or directory' errors?

I'm grepping through a large pile of code managed by git, and whenever I do a grep, I see piles …

grep
(grep) Regex to match non-ASCII characters?

On Linux, I have a directory with lots of files. Some of them have non-ASCII characters, but they are all …

regex unicode grep ascii non-ascii-characters
List file names based on a filename pattern and file content?

How can I use Grep command to search file name based on a wild card "LMN2011*" listing all files with …

linux shell unix ftp grep
How to remove leading whitespace from each line in a file

I have a file that looks something like this: for (i = 0; i < 100; i++) for (i = 0; i < 100; i++) for (…

unix sed awk grep
What are the differences among grep, awk & sed?

Possible Duplicate: What are the differences between Perl, Python, AWK and sed? What is the difference between sed and awk? …

linux bash sed awk grep
Count number of occurrences of a pattern in a file (even on same line)

When searching for number of occurrences of a string in a file, I generally use: grep pattern file | wc -l …

search count grep match
Exploitable PHP functions

I'm trying to build a list of functions that can be used for arbitrary code execution. The purpose isn't to …

php security grep
How do you grep a file and get the next 5 lines

How do I grep a file for 19:55 and get the Line 1,2,3,4,5? 2013/10/08 19:55:27.471 Line 1 Line 2 Line 3 Line 4 Line 5 2013/10/08 19:55:29.566 Line 1 Line 2 Line 3 Line 4 …

shell grep