problem with subshells or childs?

ml ml@hmdc.de
Thu Jul 6 07:23:00 GMT 2006


Hi!

[...]
> If you call sh like this, sh will try to run the file as shell script.
> And of course ls is not a shell script.
> To run a binary command (or any command actually) with sh, the command 
> should be:
> 
>     sh -c ls
[...]
>> i need some help with this:
>> My plan was to use rsync via ssh from a bash script. But rsync could 
>> not run ssh for whatever reason: no such file or directory.
>>
>> For quicker checking, invoking "bash -e ls" or just "sh ls" shows the 
>> same problem - see below.


sh -c ls works. However, the the original problem was that this little 
shell script is not working:

#!/usr/bin/sh
/bin/rsync -Cavz -e "/usr/bin/ssh" /cygdrive/d/ server:/home/ml/backups/

Error is:
rsync: Failed to exec "ssh: No such file or directory (2)
rsync error: error in IPC code (code 14) at 
/home/lapo/packaging/tmp/rsync-2.6.6/pipe.c(83)
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: error in rsync protocol data stream (code 12) at 
/home/lapo/packaging/tmp/rsync-2.6.6/io.c(434)

rsync cannot find /usr/bin/ssh, but it is there.
I also tried just "ssh", since it is in the path and /bin/ssh.

Thanks,
ml

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



More information about the Cygwin mailing list