Created
September 6, 2012 13:40
-
-
Save anonymous/3656359 to your computer and use it in GitHub Desktop.
Exemplo com curl/wget + while read
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat url.txt | |
http://www.google.com?a=b&c=d | |
$ while read linha ; do curl -vs $linha >&- ; done < url.txt | |
* About to connect() to www.google.com port 80 (#0) | |
* Trying 74.125.229.212... connected | |
* Connected to www.google.com (74.125.229.212) port 80 (#0) | |
> GET /?a=b&c=d HTTP/1.1 | |
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3 | |
> Host: www.google.com | |
> Accept: */* | |
> | |
< HTTP/1.1 200 OK | |
< Date: Thu, 06 Sep 2012 13:39:19 GMT | |
< Expires: -1 | |
< Cache-Control: private, max-age=0 | |
< Content-Type: text/html; charset=ISO-8859-1 | |
< Set-Cookie: PREF=ID=40352fd9d14bc043:FF=0:TM=1346938759:LM=1346938759:S=UN3jayNdsPOiQRIG; expires=Sat, 06-Sep-2014 13:39:19 GMT; path=/; domain=.google.com | |
< Set-Cookie: NID=63=MH0vW75ZpRwn6qMqiv0pjHjvYW7rwiNM29tV2oJ6YBsDBIkl9ereGJq-WlxlUQglKGW8hpoevDODnXypPeULB2_ZzjNvVumN8fMSaLWI4CGAg9GpViJ1qgMVfttARF96; expires=Fri, 08-Mar-2013 13:39:19 GMT; path=/; domain=.google.com; HttpOnly | |
< P3P: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info." | |
< Server: gws | |
< X-XSS-Protection: 1; mode=block | |
< X-Frame-Options: SAMEORIGIN | |
< Transfer-Encoding: chunked | |
< | |
{ [data not shown] | |
* Connection #0 to host www.google.com left intact | |
* Closing connection #0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment