Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 01-02-2005, 01:08 AM   #1
Registered: Dec 2004
Location: Benicia, CA
Distribution: Fedora 6,5,4 Mandrake 10.1
Posts: 46

Rep: Reputation: 15
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
Old 01-02-2005, 01:15 AM   #2
Registered: Nov 2004
Location: BIOS
Distribution: RHEL3.0, FreeBSD 5.x, Debian 3.x, Soaris x86 v10
Posts: 379

Rep: Reputation: 30
Add ~/app to your path as follows

Open vi ~/.bash_profile
and add following code:

export PATH=$PATH:~/app

From next login you should able to execute any script/code stored in ~/app dir
Old 01-02-2005, 01:34 AM   #3
Registered: Dec 2004
Location: Benicia, CA
Distribution: Fedora 6,5,4 Mandrake 10.1
Posts: 46

Original Poster
Rep: Reputation: 15
Got it. Thanks so much


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Expect Script coolest Programming 7 02-16-2009 03:59 PM
.bashrc doesn't execute on ssh login rose_bud4201 Linux - Software 2 06-01-2005 08:28 AM
cron job for expect script ruchitadesai Programming 9 05-27-2005 04:34 AM
BAD SU- from a cronned expect script ganninu Linux - General 1 07-18-2004 10:49 AM
Automae telnet log in and execute commands (expect and send) rajatgarg Linux - Networking 0 06-24-2004 11:37 AM

All times are GMT -5. The time now is 11:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration