Wednesday, November 25, 2009

My shell keeps quiting

So I was writing a little shell script to setup some environment variables and out of habit it became:
set -e
export X=Y
First mistake: to take in environment variables from a script I need to include it, not execute it. But whatever and moved on. And did the inclusion.

All of a sudden whenever a command return an error my shell would terminate.

Yep, second mistake (very silly) by including I had set my shell options to exit on error.

Ah well, it brought a smile to face. ;-)

No comments:

Post a Comment