Archive for 'Unix Shell' Category
Remembering Regex Patterns
27 September 2007It’s often useful to remember patterns that have been matched so that they can be used again. It just so happens that anything matched in parentheses gets remembered in the variables $1,…,$9. These strings can also be used in the same regular expression (or substitution) by using the special RE codes \1,…,\9. For example
$_ = […]
Scrape MP3 Files
14 February 2007Heres how I do it:
wget -r -l1 -H -t1 -nd -N -np -A.mp3 -erobots=off -i ~/mp3blogs.txt
And heres what this all means:
-r -H -l1 -np These options tell wget to download recursively. That means it goes to a URL, downloads the page there, then follows every link it finds. The -H tells the app to span […]