How can variable creation be multithreaded in BASH scripts? For example, if a script contains the two lines below, then how can they be executed at the same time?
export BOTSUBSTITUTIONS=$(less --buffers=-1 ./conf/substitutions.xml)
export BOTPROPERTIES=$(less --buffers=-1 ./conf/startup.xml)
This example below does not work.
export BOTSUBSTITUTIONS=$(less --buffers=-1 ./conf/substitutions.xml) &
export BOTPROPERTIES=$(less --buffers=-1 ./conf/startup.xml) &
wait
&inside the()to background the less task, but the parent script isn't going to like that and simply skip over things, or still wait for the child process to finish before it returns control to the script and assigns the return value. bash is basically single-threaded.