Top "Grep" questions

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

How to copy files found with grep

I am running this command to find all my files that contain (with help of regex)"someStrings" in a tree …

bash grep pipe cp
git rename many files and folders

I am trying to rename many files in my application and need to be able to do a rename in …

git file grep rename
grep -f alternative for huge files

grep -F -f file1 file2 file1 is 90 Mb (2.5 million lines, one word per line) file2 is 45 Gb That command doesn't …

unix scripting grep large-files
Linux: Block until a string is matched in a file ("tail + grep with blocking")

Is there some one-line way in bash/GNU tools to block until there's a string matched in a file? Ideally, …

linux grep block gnu
How can I search my directory tree for contents within a file for a git managed project?

I like the unix find command but I always find it too 'fiddly' to use when I want to search …

git search find grep directory-tree
How to find non-printable characters in the file?

I tried to find out the unprintable characters in data filein unix. Code : #!/bin/ksh export SRCFILE='/data/temp1.…

file grep find non-ascii-characters
delete jobs by grepping qstat output and sending jobid to qdel?

I am using PBS job scheduler on my cluster, and I would like to delete jobs older than a certain …

bash grep pbs
How to kill a process with 'kill' combined with 'grep'

I'd like to kill a process/script with a simple command using. At the moment I do the following ps …

bash process grep kill ps
Using regex lookahead, egrep

If your file contains apples are good apple cider is also good Why would egrep '(?=apples)app' file fail …

regex grep regex-lookarounds
Does lookbehind work in sed?

I created a test using grep but it does not work in sed. grep -P '(?<=foo)bar' file.…

regex sed grep lookbehind