SOLVED SEE COMMENT BELOW
Ok, this one is tricky:
I call this command from Java with Process.exec():
grep -ne 'xxx\|yyy' file
and it only returns xxx?
Edit: I escape the \ with \\ in java.
But when I call the exact same command from the commandline on the same machine it returns both xxx and yyy as expected!?
I have tried everything, escaping more and less with -E, changing ' to " (which actually oddly doesn't work when you run from java either)?!
Has someone run in to the exact same odd problem?
grep -ne 'xxx\\|yyy' fileORgrep -n -e 'xxx' -e 'yyy' file?|has to be escaped on the command line, you might have to use 3 or 4\characters in your Java string!