Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 12-17-2008, 03:00 AM   #1
Registered: May 2003
Distribution: CentOS 5 64 bit
Posts: 255

Rep: Reputation: 30
Is there such thing as php includes file for bash?

I want to have a bash configuration file with a variable set like:

and the other bash files would reference

and gets LQ

hope i'm explaining this right lol
Old 12-17-2008, 08:42 AM   #2
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,195

Rep: Reputation: 265Reputation: 265Reputation: 265

The bash equivalent of php's "include" is "source".

So if your configuration file is called e.g. "myconfig", use the command "source myconfig" to include it.


bash, includes

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
LXer: Basics 101: ruby python bash perl expect php, How do the exact same thing in th LXer Syndicated Linux News 0 10-05-2008 06:00 AM
bash script includes? MIC_Rulz Linux - Software 2 09-07-2004 05:46 PM
PHP includes lawadm1 Linux - Software 1 08-21-2004 04:20 PM
Bash programming .. multiple includes ?? michael_util Programming 2 08-09-2004 11:47 AM
bash scripting/batch file type thing antken Linux - General 2 01-22-2001 07:56 AM

All times are GMT -5. The time now is 12:37 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