Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 04-22-2003, 03:19 PM   #1
FATPad
Confirmed User
 
Join Date: Oct 2001
Posts: 6,693
Korn shell scripting

Friend of mine just posted this gibberish on one of our game related messageboards. I told him I would ask around cuz I'm such a good friend.

What does it mean and what's the answer?

<---------------------------------------------------->
This is going to be a VERY basic question, but I cant get the damn syntax right.

Script A. Script B.

Script A calls Script B.

I want to pass a variable's values from script B to script A. I know I do this by doing

echo $variable

Now how do I retrieve that value in script A? In order to get some Unix functions to work, I have to use echo in another part of script B. I do NOT want that value in script A.

any idea?

I saw some code that look like

variable= `script B "var1 {var2_string}"`

that wont work if I have more than one echo in script B. What do I do?
<---------------------------------------------------->

Thanks in advance.
__________________
<a href="http://www.adultcontent.co.uk">Adult Content UK - Great British Content</a>
FATPad is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-22-2003, 05:35 PM   #2
daddio
Registered User
 
Join Date: Apr 2003
Location: NY
Posts: 24
Try this

scriptB:

#!/usr/local/bin/ksh -p # -- (Your path to ksh)
MYVARIABLE="hello" ; export MYVARIABLE

scriptA:

#!/usr/local/bin/ksh
. /$HOME/scriptB # -- Path to script B (Example)
echo $MYVARIABLE

daddio is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-22-2003, 07:12 PM   #3
FATPad
Confirmed User
 
Join Date: Oct 2001
Posts: 6,693
Thanks. I'll let him know.
__________________
<a href="http://www.adultcontent.co.uk">Adult Content UK - Great British Content</a>
FATPad is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 04-22-2003, 07:23 PM   #4
detoxed
vip member
 
Join Date: Jan 2003
Posts: 17,798
I dont like Korn.
detoxed is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.