www.delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
To: | cygwin AT cygwin DOT com |
From: | Kiyo Kelvin Lee <kiyolee AT hotmail DOT com> |
Subject: | Re: problem with subshells or childs? |
Date: | Thu, 06 Jul 2006 16:51:39 +1000 |
Lines: | 61 |
Message-ID: | <e8ibtr$dqo$3@sea.gmane.org> |
References: | <44ACA975 DOT 3070601 AT hmdc DOT de> |
Mime-Version: | 1.0 |
User-Agent: | Thunderbird 1.5.0.4 (Windows/20060516) |
In-Reply-To: | <44ACA975.3070601@hmdc.de> |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
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 Regards, Kiyo ml wrote: > Hi, > > 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. > > Can someone help me out? > > Thanks! > ml > > > ml AT cygwintest:~$ sh ls > sh: /usr/bin/ls: No such file or directory > > ml AT cygwintest:~$ bash ls > bash: /usr/bin/ls: No such file or directory > > ml AT cygwintest:~$ ls -la /usr/bin/ls > -rwxr-x---+ 1 ml Users 91136 Jul 5 07:27 /usr/bin/ls > > ml AT cygwintest:~$ ls -la /bin/ls > -rwxr-x---+ 1 ml Users 91136 Jul 5 07:27 /bin/ls > > > ml AT cygwintest:~$ cygcheck /bin/ls > d:/cygwin/bin/ls.exe > d:/cygwin/bin\cygwin1.dll > C:\WINDOWS\system32\ADVAPI32.DLL > C:\WINDOWS\system32\ntdll.dll > C:\WINDOWS\system32\KERNEL32.dll > C:\WINDOWS\system32\RPCRT4.dll > d:/cygwin/bin\cygintl-3.dll > d:/cygwin/bin\cygiconv-2.dll > > > ml AT cygwintest:~$ cygcheck /usr/bin/ls > d:/cygwin/bin/ls.exe > d:/cygwin/bin\cygwin1.dll > C:\WINDOWS\system32\ADVAPI32.DLL > C:\WINDOWS\system32\ntdll.dll > C:\WINDOWS\system32\KERNEL32.dll > C:\WINDOWS\system32\RPCRT4.dll > d:/cygwin/bin\cygintl-3.dll > d:/cygwin/bin\cygiconv-2.dll > > -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |