How to give a pattern for new line in grep? New line at beginning, new line at end. Not the regular expression way. Something like \\n.
Thanks to @jarno I know about the -z option and I found out that when using GNU grep with the -P option, matching against \n is possible. :)
\n
Example:
grep -zoP 'foo\n\K.*'<<<$'foo\nbar'
Prints bar
bar