begin quoting John H. Robinson, IV as of Mon, Sep 11, 2006 at 11:49:11AM -0700: [snip] > sh is too easy: > > $ for i in `lynx -dump http://www.google.com/supported_domains`; do echo > "RewriteCond %{HTTP_REFERER} ^http://www$i [OR]"; done > exclude_list
Didn't say it was hard. (And, as carl pointed out, you left out a 'feature'.) > perl is a bit more difficult, as one would likely want to use a perl > module for the http stuff. Bah! Why bother? A shell one-liner is all > that is needed. There's more than one way to do it. What matters is getting it done in a timely manner. You could also use awk or sed for a one-liner approach as well. Any takers? However, trying for the one-liner may be a false optimization -- I would say that a "usable" one-liner needs to be < ~80 characters. If it's too much longer, it's wrapping across multiple lines, and only technically qualifies as a one-liner -- but not in spirit. -- _ |\_ \| -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
