How to strip out all of the links of an HTML file in Bash or grep or batch and store them in a text file

$ sed -n 's/.*href="https://stackoverflow.com/questions/21264626/\([^"]*\).*/\1/p' file
http://www.drawspace.com/lessons/b03/simple-symmetry
http://www.drawspace.com/lessons/b04/faces-and-a-vase
http://www.drawspace.com/lessons/b05/blind-contour-drawing
http://www.drawspace.com/lessons/b06/seeing-values

Leave a Comment