![]() |
[SHELL] script in script
Hi,
I have a problem with the execution of a script in a script. I want recover a variable in a script and test this in a other . For exemple : A script : sc1.sh Code:
#!/bin/shCode:
#!/bin/shI try with export var , but it's not good too. Can you say me how can I do this? Thx. |
I try this
sc1.sh : Code:
#!/bin/shCode:
#!/bin/shex: sh /folder/sc2.sh var . Where is the problem? |
So if I understand you correctly, you want to pass one variable onto another script? Theres two ways that come to mind straight away:
* Lets say the two scripts are in the same directory... Example 1 ---------- Script 1: Code:
#!/bin/shCode:
#!/bin/sh---------- Script 1: Code:
#!/bin/shCode:
#!/bin/shThanks, hope it helps. |
Quote:
sc1.sh: Code:
var=3Code:
#!/bin/sh |
| All times are GMT +2. The time now is 06:18. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.