Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Is it possible to change the directory of the parent process on Linux?

by Anonymous Monk
on Mar 10, 2021 at 15:40 UTC ( #11129409=note: print w/replies, xml ) Need Help??


in reply to Re: Is it possible to change the directory of the parent process on Linux?
in thread Is it possible to change the directory of the parent process on Linux?

Yes, this orders the shell to *replace itself* ("exec ...") with another one ... which might do more changes than you want, such as losing environment-variable settings that are not made by .bashrc. Another common way to do it is to simply put the command which invokes the Perl script into a "two-liner" command-file which ends with a cd command. The Perl script is run, then the current-directory is changed, then the command-file ends, and you're still in the same shell instance.
  • Comment on Re^2: Is it possible to change the directory of the parent process on Linux?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11129409]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2021-05-07 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (93 votes). Check out past polls.

    Notices?