parallel
[Top][All Lists]
Advanced

[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: Ole Tange
Subject: Re: zsh problem: exporting a function within a bash script for parallel to use
Date: Sun, 25 Nov 2012 20:21:52 +0100

On Sat, Nov 24, 2012 at 5:50 PM, John <da_audiophile@yahoo.com> wrote:
> 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

> #!/bin/bash
> word="$1"
>
> export word
>
> work() {
>   tar zcf $word.tar.gz $word
> }
>
> export -f work
> echo $word | parallel work

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.

/Ole



reply via email to

[Prev in Thread] Current Thread [Next in Thread]