Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: How to make perl affect my shell

by zigdon (Deacon)
on Sep 15, 2005 at 11:30 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://492170]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (1)
As of 2024-04-24 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found