From: jeffdbREMOVETHIS AT goodnet DOT com (Mikey) Subject: Re: bash -s from .bat file 17 Jul 1998 07:15:52 -0700 Message-ID: <35ae620e.7580514.cygnus.gnu-win32@smtp.goodnet.com> References: <19980715164705 DOT 26747 DOT rocketmail AT send1e DOT yahoomail DOT com> Reply-To: jeffdbREMOVETHIS AT goodnet DOT com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: earl AT hpato DOT aus DOT hp DOT com, gnu-win32 AT cygnus DOT com your CYGWIN32 env var needs to be set to binmode and you need to get rid of \r from foo.sh. or you need to set nobinmode and make sure foo.sh has \r\n if \a\b\c\ is ANYWHERE in your mount table, you need to make sure the mount entry matches the mode of foo.sh, either \n or \r\n mixing them won't work. On Thu, 16 Jul 1998 10:10:44 +1000, you wrote: >Earnie Boyd wrote: >> > This is probably true (I haven't tried it yet), but doesn't really >> > answer the question why foo.bat containing >> > >> > sh -s %1 < \a\b\c\foo.sh >> > >> > run from a Win32 command shell doesn't work on b19. >> > >> >> It is most likely because sh which is a port of linuxes ash ends up >> trying to open abcfoo.sh instead of \\a\\b\\c\\foo.sh. > >Sorry, I meant to write: > >bash -s %1 < \a\b\c\foo.sh > >I can understand reasons why ash doesn't work --- but I would >have thought that bash would be ok. > >I've done some more experimenting. Here is a small shell script, >c:\foo.sh: > >: bar=1 >echo Hello > >I type: > >C:\>bash -s < \foo.sh >Hello >: command not found > >C:\>C:\tmp>bash \foo.sh >Hello > >It turns out that I get the same behaviour if I move this to e:\foo.sh >and on e: drive type: > >E:\vob>bash -s < \foo.sh >Hello >: command not found > >E:\vob>bash \foo.sh >\foo.sh: \foo.sh: No such file or directory > >Note that bash is unable to find foo.sh using the drive relative Win32 >path name. > >Earl - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".