VocabReminder
Easily build a great vocabulary without studying! Now on the App Store!
Click here for more info about the app

Using Grep To Find or Match All Links in an HTML Document

       

egrep -or "(http(s)?://){1}[^'\"]+" path/to/directory

You can further reduce to just return the images by piping again.


grep -r src views/ | egrep -o "(mailto|ftp|http(s)?://){1}[^'\"]+"

The -r flag is for a recursive directory scan.

Tagged w/ #grep #unix #commands #searching