Mail Archives: cygwin/1997/12/03/01:58:35
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 AT netzone DOT 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 AT cygnus DOT com" with one line of text: "help".
- Raw text -