This question already has an answer here:
- grep: memory exhausted 4 answers
I have a script that streams a pattern in a single line (no linebreaks). I want to
stock_ticker in that line and output it as soon as I have found one. Now the script is never ending and is essentially looping indefinitely.
One alternative I thought how I could work on this probably would be to split the input stream into lines and pipe it to grep. I understand that you can
grep an output - however per my understanding I find everything from
awk read line by line.
Anyway I can change this behavior and work on this?
./a.out | grep 'stock_ticker'
Memory exhausted. This is because grep reads line by line before spitting output. I would want to change that behavior. Any ideas how?