Saturday, March 05, 2005

Technical Notes: Fun with command lines

by Tom Bozzo

This grep command:

grep -h -o -e '<a href="http://[url].*.html">' *.html >file.txt

...searches every file ending in ".html" in the current directory for "a" tags linking the site given by [url] and, on a Unix-like OS such as Mac OS X or Linux, places the links in "file.txt."
Comments:
Careful! Don't poke an eye out with that-there grep thing!
 
Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?