LinuxQuestions.org
Visit the LQ Articles and Editorials section
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, 03: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, 04:37 PM   #2
TB0ne
Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 14,642

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


All times are GMT -5. The time now is 07:21 PM.

Main Menu
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