Filtering with egrep - the final bit
by GPGAgent from LinuxQuestions.org on (#5760N)
I've filtered HandbrakeCLI output to get the title informationI want except for one bitCode:jonke@charlie:/media/jonke/home/jonk/DVDs$ HandBrakeCLI -i V/*.iso -t 0 2>&1 | egrep 'title' | egrep -v 'scanning|decoding|preview|angle|subtitle|hb_scan|bluray'
[12:17:06] scan: DVD has 12 title(s)
[12:17:06] scan: ignoring title (too short)
[12:17:06] scan: title 2 has 1 chapters
[12:17:06] scan: title 3 has 1 chapters
[12:17:06] scan: title 4 has 1 chapters
[12:17:06] scan: title 5 has 1 chapters
[12:17:06] scan: title 6 has 16 chapters
[12:17:06] scan: title 7 has 1 chapters
[12:17:06] scan: title 8 has 1 chapters
[12:17:06] scan: title 9 has 1 chapters
[12:17:06] scan: title 10 has 1 chapters
[12:17:06] scan: title 11 has 1 chapters
[12:17:06] scan: title 12 has 1 chapters
+ title 2:
+ title 3:
+ title 4:
+ title 5:
+ title 6:
+ title 7:
+ title 8:
+ title 9:
+ title 10:
+ title 11:
+ title 12:
jonke@charlie:I want to exclude the + title 2: to + title 12: lines.
Code: | egrep 'title' | egrep -v 'scanning|decoding|preview|angle|subtitle|hb_scan|bluray'What do I need to add? Or do I need to do something else? Tips please.


[12:17:06] scan: DVD has 12 title(s)
[12:17:06] scan: ignoring title (too short)
[12:17:06] scan: title 2 has 1 chapters
[12:17:06] scan: title 3 has 1 chapters
[12:17:06] scan: title 4 has 1 chapters
[12:17:06] scan: title 5 has 1 chapters
[12:17:06] scan: title 6 has 16 chapters
[12:17:06] scan: title 7 has 1 chapters
[12:17:06] scan: title 8 has 1 chapters
[12:17:06] scan: title 9 has 1 chapters
[12:17:06] scan: title 10 has 1 chapters
[12:17:06] scan: title 11 has 1 chapters
[12:17:06] scan: title 12 has 1 chapters
+ title 2:
+ title 3:
+ title 4:
+ title 5:
+ title 6:
+ title 7:
+ title 8:
+ title 9:
+ title 10:
+ title 11:
+ title 12:
jonke@charlie:I want to exclude the + title 2: to + title 12: lines.
Code: | egrep 'title' | egrep -v 'scanning|decoding|preview|angle|subtitle|hb_scan|bluray'What do I need to add? Or do I need to do something else? Tips please.