Re: Strange problem with source

2014-01-13 Thread Cecil Westerhof
Op Monday 13 Jan 2014 07:42 CET schreef Bert Barbe: > I think what happens is the following: > > "Using declare limits the scope of the variable." Since the source > of b happens inside the function includeFile, the declare of > testVariable happens inside that function, and it's scope is limited

Re: Strange problem with source

2014-01-12 Thread Bert Barbe
n 01/12/2014 01:31 PM, Cecil Westerhof wrote: Is this a known problem? I have a strange problem with source. Sometimes variables are not defined, but functions are. I have a file a with: function includeFile() { local fileName local needsToExist=true if [[ ${1}

Strange problem with source

2014-01-12 Thread Cecil Westerhof
Is this a known problem? I have a strange problem with source. Sometimes variables are not defined, but functions are. I have a file a with: function includeFile() { local fileName local needsToExist=true if [[ ${1} == "--notNeeded" ]] ; then ne