/bin mount point and sh.exe

Randall Schulz rschulz@Teknowledge.COM
Mon May 24 18:39:00 GMT 1999


Suhaib's response is correct. But to expound, let me point out a few other
pertinent facts:

This command (whether invoked from sh, BASH or a "DOS" prompt):

	sh command

is a request to have sh open the file "command" and interpret it as a
script of shell commands. It will do this regardless of whether or not the
file named "command" has a suitable execute bit set. Under Linux, sh does
PATH searching in this case. Under cygwin it apparently does not. In this
case, arguments following "command" will be presented to the "command"
script (assuming it is one) as $1, $2, etc. shell script parameters.

This one:

	sh -c "command argument-to-command"

requests sh to interpret the string given as an argument to the "-c" option
as a command, pretty much as if you'd typed it to an interactive instance
of "sh." In this case "command" must have an execute bit set.

One last (interesting) thing to note: Under cygwin, a file will display
execute bits if it begins with "#!". I suppose this is one reason why "ls
-l" is so much slower under cygwin (at least the first time--before the
disk cache is primed with the files' contents) than a "details" listing
under Windows Explorer.

Randy Schulz
Teknowledge Corp.
Palo Alto, CA USA

At 06:04 PM 5/24/99 , Suhaib M. Siddiqi wrote:
>Mark Peterson wrote:
>> I have chosen the "identity mount" setup and mounted
>> This is the question:
>> At DOS with paths set up so that the H-i586-cygwin32/bin directory can
>> be found, should I be able
>> to simply type:
>> sh ls
>If you have H-i586-cygwin32/bin in your DOS path sould be able to
>type ls (not sh ls) and get the results.
>> and get a directory?  As it is, sh cannot find ls in this way.  Is this
>> bad syntax, or is this normal behavior?
>> My mounts are down below.
>> Thanks,
>> Mark

Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com

More information about the Cygwin mailing list