Carl Lowenstein wrote: > On 9/11/06, John H. Robinson, IV <[EMAIL PROTECTED]> wrote: > > > >$ for i in `lynx -dump http://www.google.com/supported_domains`; do echo > >"RewriteCond %{HTTP_REFERER} ^http://www$i [OR]"; done > exclude_list > > OK, but somewhere you have lost the requirement to exclude > "\.google\.com$" from the exclude_list. So a pipe to "grep -v" is > called for, or else you can say "oops, I have to edit exclude_list > before I actually use it."
Yes, I did overlook that requirement. Update: $ set `lynx -dump http://www.google.com/supported_domains` $ shift $ while [ $1 ]; do echo "RewriteCond %{HTTP_REFERER} ^http://www$1 [OR]"; shift; done > exclude_list No, I don't think ``oneliner'' means < 80 characters. I do think that it includes a simple pipeline, or a simple loop. Note that the updated one is not a simple loop, it requires setup. Namely, in the dropping of the first item. I also think there is a reasonable upper bound of how long a ``oneliner'' can be, usually 160 or 240 characters. -john -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
