On Linux, when I do echo foo | grep -o '^.' to get the first character, it prints f as expected. (I know, | cut -c1 would probably be faster.)But on OSX, doing the same results in 3 matches (3 lines):fooWTF? Even without the -o option, the color of the output (in my environment) tells me that the whole line matches, instead of just the first character.Can anybody please enlighten me?
Behavior of grep -o on OSX
grep;osx