I have a script file
filename: test_sem_zsh.sh
main() {
echo "Happy day"
}
export -f main
sem --id testing --fg main
I am trying to run it using zsh
$ zsh test_sem_zsh.sh
test_sem_zsh.sh:export:4: invalid option(s)
zsh:1: command not found: main
It says two error's 1) main command not found
and 2) export:4: invalid option(s)
Where as when i try with bash
it works
$ sh test_sem_zsh.sh
Happy day
So how to get this script working with zsh
also