Import variable


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Import variable
# 1  
Old 03-16-2009
Import variable

Can i import a value of a variable in a different related script.
# 2  
Old 03-16-2009
yes, you can..

just give us some sample requirement that you need please.!!!.

Thanks
Sha
# 3  
Old 03-16-2009
Hi,

Yes you can.

Suppose you have some variables which you want to use in file1.sh.
Now to import those variables in file2.sh what you need to is just run the file1.sh in your file2.sh.
Code:
cat file2.sh

-----------
./file1.sh

This will do for you.

Thanks
NT
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to import a variable Used in Another Korn Shell Script?

Hi I am using two shell scripts which are running on the system simultaneously. And in one of the script i am exporting an Integer Variable. Now i want to use the variable in another script. But i cannot run the first script in the second as the first script has many other functions which... (3 Replies)
Discussion started by: Ajesh
3 Replies

2. Shell Programming and Scripting

How to import a value from txt file

Hello, I want to give a value from a txt file to my variable at my ksh script. I`ve searched on the net and I found the command variable < file.txt but it cannot see the file. The .txt file contains two values in the first and the second line. Is there any way to give the first-line value to... (1 Reply)
Discussion started by: chris_euop
1 Replies

3. Shell Programming and Scripting

export / import

I have a calling script which consists of calls to other scripts via the sh command. ie vi callscript.sh sh smallscript1.sh extra unix commands sh smallscript2.sh exit In smallscript1, I prompt for a filename, which I handle via :- read f1 export f1 I then need... (5 Replies)
Discussion started by: malts18
5 Replies

4. Shell Programming and Scripting

import string from file A to become variable in file B

i need to fetch string from file A into varible at file B example: $cat A.txt 2271 B.sh #!/bin/sh number=2271(from file A) kill -9 $number so,how can i make it happen? Thx (5 Replies)
Discussion started by: bremboz
5 Replies

5. Shell Programming and Scripting

is it possible import the variable ?

Hi All, I need to hold one variable in another script. I mean, i will be running 1st script say ScriptA which should import one variable from another script say ScriptB. I will be incrementing the variable everyday in ScriptA and want to place it in ScriptB.The next day i should get the... (2 Replies)
Discussion started by: vinayakatj56
2 Replies

6. Solaris

How to import the new service

Hi How to import the new service which i created without root permission. As well how we can set the uid in service. When i import i got the following error, svccfg import /var/svc/manifest/site/newservice.xml svccfg: Could not create temporary service "TEMP/site/newservice"... (6 Replies)
Discussion started by: kalpeer
6 Replies

7. Solaris

x 86 svccfg import error

I get this error I have a laptop with solaris 10 x86 installed How can I go about this Thank you State: offline Reason: Start method is running See: Sun Message ID: SMF-8000-C4 See: /etc/svc/volatile/system-install-discovery:default.log Impact: 11 dependent services are not running:... (1 Reply)
Discussion started by: oscarl
1 Replies

8. Shell Programming and Scripting

exceptions in import

Hello, I want to import an Oracle database file on my fresh DB, bought before successfully with exp command. But is it possible to import some tables from the dmp file, because they are too large and it's so long !? I didn't find any option in imp command to make exception on certain tables...... (1 Reply)
Discussion started by: madmat
1 Replies

9. UNIX for Dummies Questions & Answers

import

Dear All, If while the databsae was shut down, an import command has been done. Will the import result will return 1? Best Regards, Omran (1 Reply)
Discussion started by: omran
1 Replies

10. Shell Programming and Scripting

import

i'm importing tables to oracle 7, but sometimes import give me warnings (not failures) how can i rollback the whole imported tables if warnings occured please advise thanx (2 Replies)
Discussion started by: omran
2 Replies
Login or Register to Ask a Question