Under Mac OSX (Mountain Lion), I have a shell script a:#!/bin/bashopen -a Terminal bwhich run another shell script b using Terminal:echo `pwd`Something interesting is that, no matter where my running scripts are located, the pwd command in b always returns the home directory.Questions:Why does this happen?How to set the running environment to be the working instead home directory (ie, return the working directory when arriving at pwd)
why the open command runs under the home directory?
osx