I have a bash script, from which I need to start another script with source. This is working fine, but I also need to pass the 2nd script parameters.
Example:
source /usr/local/scripts/parallel.sh test --gnu
So I need to start parallel.sh with a given data-source file called test, and I also need to assign a parameter --gnu at the end. But it is not recognizing the file and the parameter.
parallel.shRunning it, on the other hand, will put it into a separate process, variable will only be seen inparallel.shif you've exported them and any env var you change will be lost once control returns to your calling script.test --gnuparameters being passed toparallel.sh? If so, that should work fine. You should be able to reference them as${1}and${2}withinparallel.sh