Hello, I'm running linux debian and I'm trying to parse large files with loads of data, to sort out the most of the junk I dont want I'm using the linux function grep.
The php function looks like this:
exec('cat filename | grep "K;"',$array);
Basically I pipeline the file to the function grep that filters out all lines that dont include the characters K;. Even with the filtering there is about 5000 lines of data left that needs to be filled in that $array.
But im getting this error when im running it: grep: writing output: Broken pipe. I googled some and apparently this means that grep is unable to pipe the data any further and since php is next im guessing that's the problem.
Of course I'm not a 100% sure of this but since it doesnt work im looking for help or atleast someone that can point me in the right direction.
Thank you.