The file in this gist has two long lines.
- When I run
tail -n 1
on it, both lines are returned (I would expect just the last one). - When I run
head -n 1
on it, only the first line is returned (as expected). - When I run
wc -l
on it, it returns 1 (I would expect 2).
If I remove one character from either the first or second line, then some things change:
- [DIFFERENT] When I run
tail -n 1
on it, only the last line is returned (as expected). - [SAME] When I run
head -n 1
on it, only the first line is returned (as expected). - [SAME] When I run
wc -l
on it, it returns 1 (I would expect 2).
What is going on here? Why are tail
and wc
not behaving as I would expect on this file?
I'm on OSX 10.14.2 and a colleague was able to repro the same behavior on another machine.