Regex (grep) for multi-line search needed [duplicate]

Without the need to install the grep variant pcregrep, you can do a multiline search with grep. $ grep -Pzo “(?s)^(\s*)\N*main.*?{.*?^\1}” *.c Explanation: -P activate perl-regexp for grep (a powerful extension of regular expressions) -z Treat the input as a set of lines, each terminated by a zero byte (the ASCII NUL character) instead of … Read more

grep without showing path/file:line

No need to find. If you are just looking for a pattern within a specific directory, this should suffice: grep -hn FOO /your/path/*.bar Where -h is the parameter to hide the filename, as from man grep: -h, –no-filename Suppress the prefixing of file names on output. This is the default when there is only one … Read more

How to search contents of multiple pdf files?

There is pdfgrep, which does exactly what its name suggests. pdfgrep -R ‘a pattern to search recursively from path’ /some/path I’ve used it for simple searches and it worked fine. (There are packages in Debian, Ubuntu and Fedora.) Since version 1.3.0 pdfgrep supports recursive search. This version is available in Ubuntu since Ubuntu 12.10 (Quantal).

Exploitable PHP functions

To build this list I used 2 sources. A Study In Scarlet and RATS. I have also added some of my own to the mix and people on this thread have helped out. Edit: After posting this list I contacted the founder of RIPS and as of now this tools searches PHP code for the … Read more