Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: pure zsh implementation of wget
- X-seq: zsh-users 16415
- From: Guido van Steen <gvsteen@xxxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: pure zsh implementation of wget
- Date: Sat, 24 Sep 2011 09:49:11 -0700 (PDT)
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1316882951; bh=NfzDvtTxFL0EsGCIS+nd6NGNX065WM4NLP65ZI9y7Jc=; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=guMyO0dzc3aMtLmDJNqpEXnWZLcXZcbSPcn4ZaVUh6Y4Cqy/uBZ11/yBEzTjP3ZgB9O6rwyDkhBlYiRne7EOpX3xlZNzHo878z0LLcqWE0YYMfxWME+ywGuO186diPDvWu9h7p5BAVYH6JhYCNL/N9vkN1UOr9V7jQw00tO1c8U=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=fSdFPcEzZOcN5sj8M0Jmk6lRCtEbGnF6EqRKx0nyekbbmVeCKM6Y3zrRXsTiGg+gPoAXwZ/ILcdRf+QCQOCMsuQs32SawY31hbj1p7+ZP85G6OXrmrRwQSpxWuK2DjrJBQ/bVJxvb0ulYxSZTZnWT9doGSbYRXiMizkp3w/4kXw=;
- In-reply-to: <CAHYJk3RSzc0kReHoWDqA1qyLMkotRYu2bm3QkQvdDMJCRWOduw@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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