Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: How to make perl affect my shell

by zigdon (Deacon)
on Sep 15, 2005 at 11:30 UTC ( #492170=note: print w/replies, xml ) Need Help??


in reply to How to make perl affect my shell

The way I've done it is I have an alias in the shell that sources a file that's created by the perl script:
apocalypse$ which c c is an alias for . ~/bin/mychdir $ cat ~/bin/mychdir # ~/bin/finddir $1 $2 $3 $4 $5 $6 $7 $8 $9 cd "`cat $HOME/.targetdir`"
The benefit is that it stays within the same shell, which means my history and background jobs are all still there.

-- zigdon

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2019-05-27 10:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (155 votes). Check out past polls.

    Notices?