On 4/27/05, Binand Sethumadhavan <[EMAIL PROTECTED]> wrote: > On 27/04/05, Tusar Nayak <[EMAIL PROTECTED]> wrote: > > On 4/27/05, Binand Sethumadhavan <[EMAIL PROTECTED]> wrote: > > > On 27/04/05, Logu <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > > > > > What is the difference between invoking a bash shell script with "source > > > > ./scriptname" and ". ./scriptname". I thought both are same (to invoke > > > > the > > > > script in current shell). But when there is an exit statement, when the > > > > script is invoked with "source ./scriptname" exits the current shell > > > > where > > > > as the ". ./scriptname" did not. > > > > > > You sure? Both versions exits the current shell for me. > > > > > When you execute it as ./scriptname , the script runs under a > > subshell. So when it runs the exit statement, it exits the subshell. > > Whereas when you run as source ./scriptname, it runs under the > > current shell and therefore it exits the current shell. > > Indeed. You might just want to read the original post once again. > ./scriptname is not even under discussion here. > > Binand > my mistake.. my eyes missed one dot -;)..sorry abt that - Tusar
------------------------------------------------------- SF.Net email is sponsored by: Tell us your software development plans! Take this survey and enter to win a one-year sub to SourceForge.net Plus IDC's 2005 look-ahead and a copy of this survey Click here to start! http://www.idcswdc.com/cgi-bin/survey?id5hix _______________________________________________ linux-india-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-india-help
