Question: 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.

Answer: 
try `pcregrep` instead of regular `grep`:

```
pcregrep -M "pattern1.*\n.*pattern2" filename

```

the `-M` option allows it to match across multiple lines, so you can search for newlines as `\n`.
just found

```
grep $'\r'

```

It's using `$'\r'` for c-style escape in Bash.

in [this article](https://superuser.com/questions/194668/grep-to-find-files-that-contain-m-windows-carriage-return)