LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-05-2004, 04:42 PM   #1
rwalkerphl
Member
 
Registered: Jun 2004
Location: NJ, US (Ex UK)
Distribution: RHEL3.0 / FC2
Posts: 79

Rep: Reputation: 15
bash scripts and automation


Hi All,

I’m back with more basic questions…

As I have gotten more into Linux, I have installed various packages with success but have hit a snag every time. I don’t seem to be able to get things like directories to be defined in the profile to run.

For instance, I installed openvpn, and it resides in /usr/sbin, but if I try to run it fron anywhere but that directory, it doesn’t exist. I tried adding the directly to bash_profile, and when I do echo $PATH, it shows up, but I still can’t run it from anwhere else…

What am I doing wrong?

This leads onto the second question. Once I set certain things up, it seems like I have to update files to ensure they occur when I reboot the machine. Is there a list or procedure anywhere to tell me whn I make these changes, where I have to update the set up files for the setups to be initialized each time the server is re-booted?


Thanks,

Robin.
 
Old 10-05-2004, 07:07 PM   #2
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slack`er-current
Posts: 845

Rep: Reputation: 33
I'm learning bash myself, try adding...


Code:
source .bash_profile
to your .bash_profile then logout and log back in to run your script.

You can run source .bash_profile from the command line; adding it to the .bash_profile makes it permanent, but you have to log out and log back in for it to take effect. If i am wrong someone correct me

Last edited by Linux~Powered; 10-05-2004 at 07:11 PM.
 
Old 10-06-2004, 03:27 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 61
If I understand whay you're saying, they you are wrong: sourcing a file from inside itself will lead to an infinite loop!
 
  


Reply


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
little help with bash scripts sniff Programming 2 10-26-2005 06:17 PM
bash scripts hoffmanyew Programming 3 08-11-2005 02:27 AM
Need Help With Bash Scripts the_woelf Linux - Software 4 06-30-2004 10:09 AM
Bash Scripts Skute Programming 7 03-12-2004 11:17 AM
Bash scripts? BajaNick Programming 3 07-05-2003 11:13 PM


All times are GMT -5. The time now is 04:26 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration