我有这个脚本:
GLOBAL_VAR="some global value" function test { echo $1 echo ${GLOBAL_VAR} } export -f test parallel --jobs 5 --linebuffer test ::: "${files[@]}"
我怎样才能$GLOBAL_VAR从并行可见?
$GLOBAL_VAR
linux sh gnu-parallel
gnu-parallel ×1
linux ×1
sh ×1