[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: zsh problem: exporting a function within a bash script for parallel
From: |
John |
Subject: |
Re: zsh problem: exporting a function within a bash script for parallel to use |
Date: |
Sun, 25 Nov 2012 11:53:11 -0800 (PST) |
> This program works for me both with login shell bash and login shell
> zsh. So it is something in your local setup.
>
> Add a new user and see if you can reproduce the error on a newly created user.
This is a good idea. I can confirm that the behavior is reproduced on a new
user after I change shells to zsh, logout, and log back in.. the solution is
simple enough: just append `SHELL=/bin/bash` to the line calling parallel:
#!/bin/bash
word="$1"
export word
work() {
tar zcf $word.tar.gz $word
}
export -f work
echo $word | SHELL=/bin/bash parallel work