Are we talking about GNU grep or BSD grep? It is worth noting as they differ in many places. On all GNU Linux distros you get GNU grep by default, while on OpenBSD, FreeBSD, NetBSD and Mac OS you get BSD grep...
Good question! I'm using GNU grep on my machine but after consulting the documentation for BSD grep, I verified that everything mentioned on this page should work identically.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.