Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: pure zsh implementation of wget



Hi, 

One more question: How should I modify that snippet to download a random  url, such as like http://security.debian.org/pool/updates/main/i/isc-dhcp/dhcp3-client_4.1.1-P1-15+squeeze3_all.deb

Thanks in advance! 

Guido 

> #!/bin/zsh
> zmodload zsh/net/tcp
> ztcp google.com 80
> fd=$REPLY
> print -l -u $fd -- 'GET / HTTP/1.1'$'\015' 'Host:
> www.google.com'$'\015' 'Connection: close'$'\015' $'\015'
> while IFS= read -u $fd -r -e; do; :; done
> ztcp -c $fd




Messages sorted by: Reverse Date, Date, Thread, Author