LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 11-22-2009, 04:33 PM   #1
Karas
Member
 
Registered: Oct 2009
Distribution: Slackware 13.0
Posts: 49

Rep: Reputation: 15
How do I pass variables?


Hi, I want to pass a variable from one script to another, I have a feeling it's extremely simple.

I looked at exporting, but apparently that clogs up the shell, so I don't want to go down that route. Any suggestions?

Thanks.
 
Old 11-22-2009, 05:37 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 15,098

Rep: Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719Reputation: 2719
Quote:
Originally Posted by Karas View Post
Hi, I want to pass a variable from one script to another, I have a feeling it's extremely simple.

I looked at exporting, but apparently that clogs up the shell, so I don't want to go down that route. Any suggestions?

Thanks.
You can just pass them as command-line variables, to the second script...process and use them as needed.

This tutorial:
http://tldp.org/LDP/abs/html/internal.html#EX33

should help
 
Old 11-23-2009, 12:55 PM   #3
Karas
Member
 
Registered: Oct 2009
Distribution: Slackware 13.0
Posts: 49

Original Poster
Rep: Reputation: 15
I love you =D Thanks!
 
  


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
pass php variables to shell script viveksnv Programming 1 03-05-2008 12:46 AM
pass & retrieve variables from awk sharathkv25 Programming 3 02-16-2007 04:05 AM
pass variables through hyperlink in php ALInux Programming 2 12-23-2005 02:27 PM
script (or other) to pass variables to C++ program ngwenyama Programming 9 01-20-2005 10:54 PM
Pass multiple URL variables PHP agallant Programming 3 10-21-2004 08:29 PM


All times are GMT -5. The time now is 01:48 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration