LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,623

Rep: Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964Reputation: 7964
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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:32 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
Open Source Consulting | Domain Registration