I was trying to run this command (on a Mac)...
$ git grep -h | grep dir
Instead of printing the lines containing dir
, it prints all the text for git grep -h
, and effectively ignores | grep dir
.
I also tried this...
$ git grep -h > foo.txt
...which prints it prints all the text for git grep -h
, and creates an empty text file.
What's going on here?