Mail Archives: cygwin/2007/09/13/10:58:54
On 9/12/07, Richard Ivarson <RiIvarson AT gmail DOT com> wrote:
>
> curl --user NAME:PASSWORD
> https://webdavserver.com/folder/{fileAA,fileBB,fileCC,fileDD,fileEE,}.txt -O
> -O -O -O -O
...
> 1) Is there a simpler way than the five "-O"'s I used? Would a wildcard be
> possible (didn't find a mention in the manpage, however).
Dunno. I actually haven't used it much; I came across it when I
wanted a tool for managing webdav resources, but ran into a problem
involving %-encoding of the space character. Never found out if it
was a problem with curl or with the server, but I found a different
method and haven't had time to go back to curl. What I really want is
a tool that can manage webdav properties in batch mode; if you know of
one please let me know. You could do it with curl, but since curl
doesn't natively understand webdav it would be a good bit of work.
For the -O issue: as with any tool that doesn't quite behave the way
you like, you can always try The Unix Way: feed the output of one
small tool into another. Download without -O, then use a shell
command or script to convert the results. Maybe something along the
lines of
$ find ./ -name "*.txt" -exec basename {} \;.
You might even be able to pipe the curl command output into basename.
-gregg
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -