Top "Grep" questions

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

How to make grep only match if the entire line matches?

I have these: $ cat a.tmp ABB.log ABB.log.122 ABB.log.123 I wanted to find a exact match of …

shell unix grep
List files with certain extensions with ls and grep

I just want to get the files from the current dir and only output .mp4 .mp3 .exe files nothing else. …

bash shell macos grep
Delete all local git branches

I follow a development process where I create a new local branch for every new feature or story card. When …

git bash ubuntu version-control grep
Validating IPv4 addresses with regexp

I've been trying to get an efficient regex for IPv4 validation, but without much luck. It seemed at one point …

regex validation ip-address ipv4 grep
Regex (grep) for multi-line search needed

Possible Duplicate: How can I search for a multiline pattern in a file ? Use pcregrep I'm running a grep to …

regex linux cygwin grep
Colorized grep -- viewing the entire file with highlighted matches

I find grep's --color=always flag to be tremendously useful. However, grep only prints lines with matches (unless you ask …

bash shell colors grep
Using the star sign in grep

I am trying to search for the substring "abc" in a specific file in linux/bash So I do: grep …

regex bash grep
How to get the part of a file after the first line that matches a regular expression?

I have a file with about 1000 lines. I want the part of my file after the line which matches my …

bash shell scripting grep
Grep characters before and after match?

Using this: grep -A1 -B1 "test_pattern" file will produce one line before and after the matched pattern in the …

bash grep
grep regex whitespace behavior

I have a textfile, containing something like: 12,34 EUR 5,67 EUR ... There is one whitespace before 'EUR' and I ignore 0,XX EUR. …

regex grep gnu