Subject: Re: bash -s from .bat file
From: [email-masked] (Earl Chew)

16 Jul 1998 09:08:44 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Reply-To: [email-masked]
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: [email-masked]
Cc: [email-masked]

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
-- 
>----------------------------------------------------------------------+
> Earl Chew                              mailto:[email-masked]       |
> Hewlett-Packard Australia              Tel:   +61 3 9210 5528        |
> Advanced Networks Division             Fax:   +61 3 9210 5550        |
> 347 Burwood Highway                    GPS:   37 51'46"S 145 10'03"E |
> Burwood East, Victoria 3151, Australia                               |
>----------------------------------------------------------------------+
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".