Top "Grep" questions

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

Display only the n'th match of grep

onefish onechicken twofish twochicken twocows threechicken What if I want to grep for lines containing "two", but I only want …

bash grep pattern-matching match
Use grep to find content in files and move them if they match

I'm using grep to generate a list of files I need to move: grep -L -r 'Subject: \[SPAM\]' . How …

linux shell scripting grep
Is it possible to perform a 'grep search' in all the branches of a Git project?

Is it possible to run git grep inside all the branches of a Git control sourced project? Or is there …

git grep
how do I use the grep --include option for multiple file types?

When I want to grep all the html files in some directory, I do the following grep --include="*.html" pattern …

shell grep
changing chmod for files but not directories

I need to use chmod to change all files recursivly to 664. I would like to skip the folders. I was …

unix grep chmod
Regex lookahead for 'not followed by' in grep

I am attempting to grep for all instances of Ui\. not followed by Line or even just the letter L …

regex grep regex-lookarounds
Finding executable files using ls and grep

I have to write a script that finds all executable files in a directory. So I tried several ways to …

linux bash grep ls
Exclude .svn directories from grep

When I grep my Subversion working copy directory, the results include a lot of files from the .svn directories. Is …

linux bash svn grep
grepping using the "|" alternative operator

The following is a sample of a large file named AT5G60410.gff: Chr5 TAIR10 gene 24294890 24301147 . + . ID=AT5G60410;Note=…

regex linux grep
Linux - How to list all users

How to write a script for linux which list all users from /etc/passwd and their UID User1 uid=0001 User2 …

linux awk grep uid