Quote:
|
Originally Posted by hsekol
example
File1 Code:
. file2.ksh
tmp=1
fn_test $tmp
File2 Code:
fn_test()
{
echo $tmp
}
echo test
here the output will be
1
test
where i want only the value present in that function, i don;t want the code present outside of that function to execute
|
If you can make File2 to contain functions and only functions, then the code in File1 would be fine.
Something like
Code:
fn_test()
{
echo $tmp
}
fn_echo ()
{
echo test
}