Calling a Script from a different script

hello,
I am very new to Scripting and want to know how i can call a first script after i run or execute the second script.
what scripting should be used in the second script to allow it to process first script as its output.

I am thanking in advance and do apologize for being naive.

thank you.

PS: if there are any good tutorials suggested in this thread i will follow them.

thank you.

You can call script from another script simply just put the name of the script
If 1st script calls 2nd script , then you can export variables between the 2 scripts .

If 1st script does not call 2nd script , then you cannot do it.

It would be helpful if you explain a bit what is the problem you're trying to solve.

Usually you can call a script withing a script by just referencing its path and name.

Not sure if this is what you are looking for, though:

$ cat script1.sh
#!/bin/bash
myString="world"
./script2.sh $myString
echo "Exiting script 1..."

$ cat script2.sh
#!/bin/bash
./script3.sh $1
echo "Exiting script 2..."

$ cat script3.sh
#!/bin/bash
echo "Hello $1"
echo "Exiting script 3..."

$ ./script1.sh
Hello world
Exiting script 3...
Exiting script 2...
Exiting script 1...
$

Thank you so much.It helped. Thanks again.