trying to execute an expect script in .bashrc
I have a script written in expect called mxx1. It resides in /home/seanm/app/mxx1. every time I want to run it I have to go to its directory and ./mxx1 to execute it. I tried editing .bashrc with alias mxx1=.//home/seanm/appl/mxx1. Obviously this doesn't work but you can see what im trying to accomplish. To be able to type mxx1 from anywhere and launch the script. .bashrc is used for aliases but can this be done in .bashrc or should I do this elsewhere and how. Thanks
|
Add ~/app to your path as follows
Open vi ~/.bash_profile and add following code: Code:
export PATH=$PATH:~/app From next login you should able to execute any script/code stored in ~/app dir :) |
Got it. Thanks so much
|
All times are GMT -5. The time now is 12:50 PM. |