0

I have two scripts, the 'main' script, script A and a script B which contains some variables. In script A, I include script B for use the variable defined in the script B like so:

scriptA:

. ./scriptb
...
echo $toto

scriptB:

export toto="hello !"

When I run my script A, I get the output:

$./scriptA
/home/user/scriptb
hello !

My question is how to remove the undesired /home/user/scriptb from output.

3
  • 1
    With the data you provide in your question is not possible to know what's going on. Commented Aug 30, 2016 at 23:19
  • What is this: ... ?? Commented Aug 30, 2016 at 23:24
  • Where is that output coming from? You haven't shown the relevant code so we can't say. You need to find the command printing that output and modify/silence it. Commented Aug 31, 2016 at 1:31

1 Answer 1

1

The code you provided in your question doesn't have any problem:

$ cat scripta
. ./scriptb
echo $toto

$ cat scriptb 
export toto="hello!"

$ ./scripta 
hello!
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.