From: jeffdbREMOVETHIS@netzone.com (Mikey)
Subject: Re: bash problem.  (Am I missing something?)
3 Dec 1997 01:58:35 -0800
Message-ID: <34879d39.87374718.cygnus.gnu-win32@smtp.netzone.com>
References: <c=US%a=INFONET%p=NESTLE%l=NESTLE-US01-0037D28F@phx1nm02.nesusa.com>
Reply-To: jeffdbREMOVETHIS@netzone.com
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: gnu-win32@cygnus.com

try 

source ./test.sh

#!/bin/sh causes the script to run in a subshell, so any exports
are lost when the toplevel shell resumes. at least I think that's right;^)
no idea where the error comes from unless #! aren't the very first 2 chars in the file.

to test shell scripts do

set -xv

either as the first command in the script, or at the command line,
and this will echo all commands.

set -axv

will export the -xv setting to subshells

On Tue, 2 Dec 1997 05:35:57 -0800, you wrote:

>I downloaded the coolview patch, and have run into a strange problem 
>with bash:
>
>let's say I have a file called test.sh:
>------------------------------
>#!/bin/sh
>
>export TESTVAR=1
>------------------------------
>
>If I try to run it, (after chmod-ing and all that...)
>
>like this:
>
>sh-2.01$ . ./test.sh
>
>I get this error:
>
>sh: ./test.sh: error 0
>
>And the TESTVAR variable isn't defined.  Can anyone tell me what I'm 
>doing wrong?
>
>Thanks.
>
>
>

(jeffdbREMOVETHIS@netzone.com)
delete REMOVETHIS from the above to reply
         Mikey

Windows vs Linux is a no-win situation.

Windows 95: --  32-bit extensions and a GUI   
shell for a 16-bit patch to an 8-bit OS       
originally coded for a 4-bit processor 
written by a 2-bit company that   
can't produce 1 bit of quality.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".
