Here is a simplified bash script. The goal is to get parallel to run the
'work' function from within the script. Per the man page, one needs to `export
-f FUNCTION` for this functionality, but I get the following error when I try
running it from zsh. If I run it from a bash shell, everything works as
expected.
% ./test target
zsh:1: command not found: work
###BEGIN SCRIPT
#!/bin/bash
word="$1"
export word
work() {
tar zcf $word.tar.gz $word
}
export -f work
echo $word | parallel work
###END SCRIPT