Jump to content

How to make "global" shell variables across multip


Recommended Posts

Hey,

 

I am trying to create a rather large shell script for a course that I am taking in school on Databases. The problem that I am having is this:

 

Instead of making it one very big script, I have chopped it up into several smaller scripts. This works except that I have several variables that I need to monitor through all the scripts. Thus, is there anyway of making these variables known to all scripts? Anyway of declaring them as global? The only thing that I can think of is to define them as environment variables, but I am not sure how to do this.

 

Any suggestions?

 

EDIT: Never mind, I figured it out. Thanks though.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...