public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 1.1.7: Problem when "sourcing" shell files
@ 2001-02-13  8:40 Miguel Alves
  2001-02-13  9:21 ` Earnie Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Miguel Alves @ 2001-02-13  8:40 UTC (permalink / raw)
  To: cygwin

I Have a simple problem with setting env variables in a shell and making
them available to my shell.

I Just Have this script (xx.sh)

#!/bin/bash
if [ "a" = "a" ]; then
        export HELLO1=WORLD1
        echo $HELLO1
fi

echo "End"

#### END SCRIPT ######

If I execute it with the "." before the command to make the HELLO1 variable
recognised in my bash session when the script finish. The execution gives
the following error

malves> . xx.sh
bash: /disk2/data/malves/bin/xx.sh: line 9: syntax error: unexpected end of
file


If if execute it without the "."

malves> xx.sh
WORLD1
End

I don't get any problems.


I'am sure that this is a very stupid error how can I solve this.

TIA,

Miguel Alves


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-02-13  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-13  8:40 1.1.7: Problem when "sourcing" shell files Miguel Alves
2001-02-13  9:21 ` Earnie Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).