I'm having a problem that is extremely odd to me.
I have a loop that reads a file line by line that looks something like this:
while read line; do echo "Beginning of loop" ## Call to function that executes .bat file echo "End of loop" done < $MANIFEST echo Outside of Loop
I call the .bat file in a sub shell, so it shouldn't affect any of my variables. It looks something like this:
$(CMD /c c.bat -c "$SCR_DIR/prepsdk.sh Build $apppath")
The weird thing is that the bat file terminates my loops somehow. Meaning I will see the following output:
Beginning of Loop Output from .bat End of Loop Outside of Loop
If the call to .bat is commented out I see
Beginning of Loop End of Loop Beginning of Loop End of Loop ..... Beginning of Loop End of Loop Outside of Loop
So the behavior is as expected with the .bat file not being called. What is it that the .bat file could be doing that causes the loop to terminate like this? It's not modifying the $MANIFEST file, I made sure of that.