John H. Robinson, IV wrote:

> Oh! Neat!
>
> % zmodload zsh/net/tcp
> % ztcp www.google.com 80
> % fd=$REPLY
> % echo get http://www.google.com/supported_domains http/1.0 >&$fd
> % echo host http://www.google.com/supported_domains >&$fd
> % echo >&$fd
> % <&$fd while read i; do
> while> [[ $i == ${(M)i##.google.(^com)} ]] && echo "RewriteCond
> %{HTTP_REFERER} ^http://www$i [OR]"
> while> done > exclude_list
>
>
> Straight zsh, not an external command in sight. Thank you for the
> pointer to /dev/tcp/ that bash2 provides. You do get an exit code of
> 1,
> but that is because of the faled read when the query to google has no
> more outut.

I think simple shell scripts are a perfect topic for 15 minutes at the
beginning of KPLUG meetings, or LPSG meetings, a little stimulus to
get the gray matter perking.

"This Weeks Throwaway Script", perhaps?


-- 
Neil Schneider                              pacneil_at_linuxgeek_dot_net
                                           http://www.paccomp.com
Key fingerprint = 67F0 E493 FCC0 0A8C 769B  8209 32D7 1DB1 8460 C47D

"Under existing conditions, private capitalists inevitably control,
directly or indirectly, the main sources of information (press, radio,
education). It is thus extremely difficult, and indeed in most cases
quite impossible, for the individual citizen to come to objective
conclusions and to make intelligent use of his political rights." 
--Albert Einstein


-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to