2
Given the following in a bunch of text files (.vb):
Partial Class [A-Za-z0-9_]
Inherits System.Web.UI.Page
End Class
I'm trying to grep for files that have this basically empty code file, to generate a list of these files, and delete them.
grep "Inherits System.Web.UI.Page[:space:]*End Class" -r
However the above grep doesn't work... And after reading through the POSIX character classes and grep man pages, I'm stumped
grep always treats the input as a set of lines. Here's the full quote from the man page: "Treat the input as a set of lines, each terminated by a zero byte (the ASCII NUL character) instead of a newline." So,
– clacke – 2015-12-17T16:13:34.480-z
makes it treat the input as a set of null-terminated lines rather than newline-terminated lines.