LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-02-2005, 01:08 AM   #1
smaudlin
Member
 
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
nixcraft
Member
 
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:

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
smaudlin
Member
 
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
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 01:58 PM.

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