delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/01/19/13:13:46

Message-ID: <438D12915E64D2118AB10000F8C1C0780143A426@zcard00e.ca.nortel.com>
From: "Ian Chapman" <ichapman AT nortelnetworks DOT com>
To: "'Eli Zaretskii'" <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp AT delorie DOT com
Subject: RE: Bash sh
Date: Wed, 19 Jan 2000 08:51:13 -0500
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2650.21)
Reply-To: djgpp AT delorie DOT com

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01BF6284.41B40E2C
Content-Type: text/plain;
	charset="iso-8859-1"



-----Original Message-----
From: Eli Zaretskii [mailto:eliz AT is DOT elta DOT co DOT il]
Sent: Wednesday, January 19, 2000 5:21 AM
To: Chapman, Ian [CAR:TM14:EXCH]
Cc: djgpp AT delorie DOT com
Subject: Re: Bash sh



On Tue, 18 Jan 2000, Ian Chapman wrote:

> First they do not seem to be executable.

Please explain what do you mean by that.  DOS/Windows filesystems don't 
have the execute bit in the file's attributes.  DJGPP library functions 
consider a file executable if (among other possibilities) it has the 
telltale "#! /bin/sh" string on its first line.  But even if there's no 
such line, I don't think the ported Bash would mind (although I didn't 
test that right now).

What exactly happens when the scripts do NOT run?  Error messages?  
Crashes?  Please describe this.
//  command not found

> However, they do run some of the time.  I think if I look at them with 
> less after that the system seems to know what they are.

This sounds like a black magic to me.  How come viewing a file with Less 
suddenly changes how the filesystem treats it?
//  That's what I was asking myself.  Maybe it was a typo but I did recheck
as I was really puzzled.

On what OS did you see this?
// bash in a win95 dos window.  Bash was invoked as the logon shell per info
I received fro this news group some time back.

> Second I thought that these were a
> wee bit like .bat files once the header was set up all you needed on the
> second etc. lines was:-
> my_prog  my_data
> 		however, it can not find my_prog which is in ~/bin.

Is "~/bin" in your PATH?
//  yes and ~/bin/sh

//  My 2nd question was should (My_prog  My_data) on line 2
what exactly should I type get it to run.  Maybe it's to do with
exporting the environment path to a sub shell.

		Sorry if I'm confusing you.  Maybe I should try bash as a 
shell running under dos.

		Regards Ian.

------_=_NextPart_001_01BF6284.41B40E2C
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2651.65">
<TITLE>RE: Bash sh</TITLE>
</HEAD>
<BODY>
<BR>
<BR>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Eli Zaretskii [<A =
HREF=3D"mailto:eliz AT is DOT elta DOT co DOT il">mailto:eliz AT is DOT elta DOT co DOT il</A>]</FONT>=

<BR><FONT SIZE=3D2>Sent: Wednesday, January 19, 2000 5:21 AM</FONT>
<BR><FONT SIZE=3D2>To: Chapman, Ian [CAR:TM14:EXCH]</FONT>
<BR><FONT SIZE=3D2>Cc: djgpp AT delorie DOT com</FONT>
<BR><FONT SIZE=3D2>Subject: Re: Bash sh</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>On Tue, 18 Jan 2000, Ian Chapman wrote:</FONT>
</P>

<P><FONT SIZE=3D2>&gt; First they do not seem to be executable.</FONT>
</P>

<P><FONT SIZE=3D2>Please explain what do you mean by that.&nbsp; =
DOS/Windows filesystems don't </FONT>
<BR><FONT SIZE=3D2>have the execute bit in the file's attributes.&nbsp; =
DJGPP library functions </FONT>
<BR><FONT SIZE=3D2>consider a file executable if (among other =
possibilities) it has the </FONT>
<BR><FONT SIZE=3D2>telltale &quot;#! /bin/sh&quot; string on its first =
line.&nbsp; But even if there's no </FONT>
<BR><FONT SIZE=3D2>such line, I don't think the ported Bash would mind =
(although I didn't </FONT>
<BR><FONT SIZE=3D2>test that right now).</FONT>
</P>

<P><FONT SIZE=3D2>What exactly happens when the scripts do NOT =
run?&nbsp; Error messages?&nbsp; </FONT>
<BR><FONT SIZE=3D2>Crashes?&nbsp; Please describe this.</FONT>
<BR><FONT SIZE=3D2>//&nbsp; command not found</FONT>
</P>

<P><FONT SIZE=3D2>&gt; However, they do run some of the time.&nbsp; I =
think if I look at them with </FONT>
<BR><FONT SIZE=3D2>&gt; less after that the system seems to know what =
they are.</FONT>
</P>

<P><FONT SIZE=3D2>This sounds like a black magic to me.&nbsp; How come =
viewing a file with Less </FONT>
<BR><FONT SIZE=3D2>suddenly changes how the filesystem treats =
it?</FONT>
<BR><FONT SIZE=3D2>//&nbsp; That's what I was asking myself.&nbsp; =
Maybe it was a typo but I did recheck</FONT>
<BR><FONT SIZE=3D2>as I was really puzzled.</FONT>
</P>

<P><FONT SIZE=3D2>On what OS did you see this?</FONT>
<BR><FONT SIZE=3D2>// bash in a win95 dos window.&nbsp; Bash was =
invoked as the logon shell per info I received fro this news group some =
time back.</FONT></P>

<P><FONT SIZE=3D2>&gt; Second I thought that these were a</FONT>
<BR><FONT SIZE=3D2>&gt; wee bit like .bat files once the header was set =
up all you needed on the</FONT>
<BR><FONT SIZE=3D2>&gt; second etc. lines was:-</FONT>
<BR><FONT SIZE=3D2>&gt; my_prog&nbsp; my_data</FONT>
<BR><FONT SIZE=3D2>&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; however, it can not find =
my_prog which is in ~/bin.</FONT>
</P>

<P><FONT SIZE=3D2>Is &quot;~/bin&quot; in your PATH?</FONT>
<BR><FONT SIZE=3D2>//&nbsp; yes and ~/bin/sh</FONT>
</P>

<P><FONT SIZE=3D2>//&nbsp; My 2nd question was should (My_prog&nbsp; =
My_data) on line 2</FONT>
<BR><FONT SIZE=3D2>what exactly should I type get it to run.&nbsp; =
Maybe it's to do with</FONT>
<BR><FONT SIZE=3D2>exporting the environment path to a sub =
shell.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Sorry if I'm =
confusing you.&nbsp; Maybe I should try bash as a </FONT>
<BR><FONT SIZE=3D2>shell running under dos.</FONT>
</P>

<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <FONT SIZE=3D2>Regards =
Ian.</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01BF6284.41B40E2C--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019