There is a script "X" which, depending on the input, will export some environment variables.
To run "X" in another script "Y", I do the following:
echo "some input" > temp_file source X < temp_file
Is there an alternative way to do this without using temporary files?
As I understand it, in the case of pipes, a subprocess is created and the next line is executed
echo "some input" | source X
environment variables cannot be set or changed in the current script.
source share