How to use grep on output from a program
by GPGAgent from LinuxQuestions.org on (#573GG)
Okay, I know I can do this:Code:jonke@charlie:~$ ps -ef|grep keyring
jonke 6029 1476 0 19:12 ? 00:00:00 /usr/bin/gnome-keyring-daemon --start --foreground --components=secrets
jonke 6457 6449 0 19:21 pts/3 00:00:00 grep --color=auto keyring
jonke@charlie:~$And it filtersout the match to keyring
But how do I filter output from a program?Code:V$ HandBrakeCLI -i *.iso -t 0 | grep titleThis doesn't filter anything from this stream:Code:+ audio tracks:
+ 1, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
+ subtitle tracks:
+ title 6:
+ Main Feature
+ index 6
+ duration: 01:39:06
+ size: 720x576, pixel aspect: 64/45, display aspect: 1.78, 25.000 fps
+ autocrop: 0/0/4/2
+ chapters:
+ 1: duration 00:05:58
+ 2: duration 00:06:32I think I need to pipe it in a different fashion but not sure how?


jonke 6029 1476 0 19:12 ? 00:00:00 /usr/bin/gnome-keyring-daemon --start --foreground --components=secrets
jonke 6457 6449 0 19:21 pts/3 00:00:00 grep --color=auto keyring
jonke@charlie:~$And it filtersout the match to keyring
But how do I filter output from a program?Code:V$ HandBrakeCLI -i *.iso -t 0 | grep titleThis doesn't filter anything from this stream:Code:+ audio tracks:
+ 1, English (AC3) (2.0 ch) (192 kbps) (iso639-2: eng), 48000Hz, 192000bps
+ subtitle tracks:
+ title 6:
+ Main Feature
+ index 6
+ duration: 01:39:06
+ size: 720x576, pixel aspect: 64/45, display aspect: 1.78, 25.000 fps
+ autocrop: 0/0/4/2
+ chapters:
+ 1: duration 00:05:58
+ 2: duration 00:06:32I think I need to pipe it in a different fashion but not sure how?