A couple of days ago I installed cygwin. I checked that grep was installed since I wanted to use it in emacs. When I wanted to obtain the difference between two files it didnt seem to work so I tried the simplest case scenario that didnt work using only the cygwin terminal.
I have two files temp1
1
2
3
4
5
6
7
8
9
0
temp2
2
3
4
5
After looking around I found that the way to do it correctly was like this:
grep -v -f temp2 temp1
When I do it in cygwin I get
1
2
3
4
5
6
7
8
9
0
whereas if I do it in linux I get the correct output
1
6
7
8
9
0
Why could this be happening? Its probably something really silly but I cant seem to find the cause and I couldn't find something similar.