[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] Usar o links num script para baixar um arquivo jpg
From: |
Denis Costa |
Subject: |
Re: [shell-script] Usar o links num script para baixar um arquivo jpg |
Date: |
Fri, 6 Jan 2012 09:20:47 -0200 |
Em 6 de janeiro de 2012 09:01, jimmy <address@hidden> escreveu:
> **
>
>
> On Fri, Jan 06, 2012 at 06:28:21AM -0200, Denis Costa wrote:
> [...]
>
> > A opção -d do curl te permite passar argumentos no request.
> Apenas como obervação, o wget faz isso com --post-data.
>
Agora vi também, a opção -O do wget.
-O file
--output-document=file
The documents will not be written to the appropriate files, but
all will be concatenated together and written to file. If - is
used as file, documents will be printed to standard output,
disabling link conversion. (Use ./- to print to a file literally
named -.)
Use of -O is not intended to mean simply "use the name file
instead of the one in the URL;" rather, it is analogous to shell
redirection: wget -O file http://foo is intended to work like
wget -O - http://foo > file; file will be truncated immediately,
and all downloaded content will be written there.
For this reason, -N (for timestamp-checking) is not supported in
combination with -O: since file is always newly created, it
will always have a very new timestamp. A warning will be issued
if this combination is used.
Similarly, using -r or -p with -O may not work as you expect:
Wget won't just download the first file to file and then download
the rest to their normal names: all downloaded content will be
placed in file. This was disabled in version 1.11, but has been
reinstated (with a warning) in 1.11.2, as there are some cases
where this behavior can actually have some use.
Note that a combination with -k is only permitted when
downloading a single document, as in that case it will just convert all
relative URIs to external ones; -k makes no sense for multiple
URIs when they're all being downloaded to a single file.
Adonai, depois, caso consiga uma solução para o seu problema, poste-a para
pesquisa futura no histórica da lista.
--
Denis Costa
Graduando em Tecnologia de Banco de dados - Fatec - São José dos Campos
Certificado LPIC-1, CLA
Usuário Linux: #516577
Usuário Ubuntu: #31758
"Você nunca obterá resultados diferentes, se fizer sempre as mesmas coisas."
[As partes desta mensagem que não continham texto foram removidas]