I am using Debian Linux (in a BeagleBone Black). The program I am using prints a lot of information on screen. So far, I have been saving entire output in a text file, which is obviously taking up a large portion of the limited storage space. For example, I was doing something like this:
./exampleProgram > Output.txt
As I said, this file contains a lot of information, which I don't really need at this moment. I only care about the lines which starts with the words "Schedule request". I am looking for a way to save just those lines to the output file, and ignore rest. I tried following, but it did not work.
./exampleProgram | grep "Schedule request" > Output.txt
How can I do this?