I have bunch of ISO images in my hdd and I have their whole content listed inside a text file in the following format:
<immage>.iso, <dir structure>/<filename>.<extension>
OS Backups.iso, ubuntu-12.04-desktop-i386.iso OS Backups.iso, xubuntu-12.04-desktop-i386.iso OS Backups.iso, background/pictures.jpg Pictures vacation 2011.iso, documents/cost_estimates.xls Pictures vacation 2011.iso, italy/img1.jpg Pictures vacation 2011.iso, italy/img2.jpg
Now I want to issue a grep command against that text file to find files that contain "pictures" in their names. The expected result would be (for the previous example):
Pictures vacation 2011.iso OS Backups.iso, background/pictures.jpg
Any ideas on how to accomplish something like this using grep? Alternatives? Thanks!