Re: why setenv doesn't work with arg
"JoshforRefugee" <ankitks@yahoo.com> schrieb im Newsbeitrag
news:1189091832.344264.267980@r34g2000hsd.googlegr oups.com...
>
>>
>> This question is essentially the same question as "why can't I write a
>> shell script that changes my current directory?".
>
> I am fairly new to unix env. Can you tell me why I can't write shell
> script that changes my current dir
Because that shell script would run in a new shell (child process of your
current one), change directory there, but then that new shell ends and in
your old shell you're still in the old directory.
Unless you explicitly tell your current shell interpret that script itself,
e.g. by using the . command.
Bye, Jojo
|