This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Re: Webdav cadaver: script possible?


I'm a unix sysadmin/oracle DBA. For me, Expect is the killer app of
Cygwin, even over the X server. Get the O'Reilly Expect book by Don
Libes. It is a treasure trove of Unix knowledge as well as Expcect/TCL.
Check out the autoexpect script. You may have to find it somewhere to
install it into the Cygwin distro, but it records your keystrokes and
creates a primitive expect script to redo the steps. You can take the
basic script and edit it to ensure it is efficient and robust. Expect
scripting requires that you understand the interactive interaction you
are trying to automate and it requires that you learn some of the magic
of globs and regular expressions. There are some great debug flags that
will show you exactly what the interpreter is thinking. Great stuff.

-----Original Message-----
From: Richard Ivarson [mailto:RiIvarson@gmail.com] 
Sent: Tuesday, September 11, 2007 4:48 PM
To: cygwin@cygwin.com
Subject: Re: Webdav cadaver: script possible?

Thorsten Kampe schrieb:
> * Richard Ivarson (Mon, 10 Sep 2007 21:37:42 +0200)
>> ... or maybe there is another client/programm to access Webdav from
within 
>> Cygwin?
>>
>> ... or is there any way to feed scripted lines to a standard Cygwin
command 
>> line programm? (Re-direction, somehow?)
> 
> Expect?

Thanks for that hint, Thorsten.
I didn't know "expect" but it seems very powerful, useful -- and complex
to 
master. :-)

Meanwhile due to your hint I've remembered the "simple" redirection
method in 
Windows (and similar in Unix), and tried:

  cadaver < lines.txt

with "lines.txt" holding these three lines:
 >>
USERNAME
PASSWORD
ls
<<

It partly works: I see that it connects to the Webdav server and prints
the 
directory, so it must have been logged in correctly.
However somehow it never comes to line three but just returns...
I've got no idea why and also I've got no plan how to make "except"
doing the 
little task.

-ric


--
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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]