I'm not sure the title is very explicit, sorry for that, but I couldn't find a clearer way to describe my problem in so few words.
So I'll explain my problem here (and if an admin/someone finds a more suitable title, please change it/tell me so that I'll change it).
Let's say I have the following bash script, let's call it main.sh:
#!/bin/bash
var1="foo"
var2="bar"
var3="baz"
var4="qux"
# Some command here
and another script, external.sh, which simply looks like
echo $var1 $var2 $var3 $var4
Is there a way I can simply paste the external.sh under the "# Some command here" line in main.sh, so that when I execute main.sh, it echoes "foo bar baz qux" as expected?
I've already tried to add a line like cat external.sh but of course the output of ./main.sh is 'echo $var1 $var2 $var3 $var4'.
I know there are some alternatives, like transforming external.sh into a real bash script with 4 arguments, and execute external.sh from main.sh with $var1..$var4 as arguments, but that is not really what I want here.
So any help would be much appreciated.