Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh will not run scripts as /bin/bash even with #!/bin/bash as the first line
- X-seq: zsh-users 17428
- From: Yichao Yu <yyc1992@xxxxxxxxx>
- To: John <da_audiophile@xxxxxxxxx>
- Subject: Re: zsh will not run scripts as /bin/bash even with #!/bin/bash as the first line
- Date: Sat, 24 Nov 2012 21:41:13 -0500
- Cc: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=MxIANRVHqeKq47M705LJUjcqrMhEmIbDkTEE9wlBdTQ=; b=M5nLz/zkm5n+YKUMjs3J2nIrhcroJDq+Arnp8L3qHAc8gCiikVhrqe4CPDbLOHj9tz FRRGzmCs+PxO0pfnMu501CC922OqLLS+kUltAC30j/ddrvXUYNidPdeQgfCTxiMVs+Us fZtFzlGr941w4eSh7itGnp4nH334ncdoeleXsuE4T17ZN8Y6LRRX12nuF9RuLubJtgdE 7aDtaT3wD38z/R7nSjhcQBDuHHq4zRmt0Np17YwxOF7maAQtJZLTtTJ+DGrsHvA36gLt dNfaMTz46TdnJUrMs3gGY1HzRjeSX0j0tQuFTrjkEZhhFZAYQrLSPYWnAvMUNyVb82+N 99NA==
- In-reply-to: <1353805621.95002.YahooMailNeo@web140001.mail.bf1.yahoo.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <1353805621.95002.YahooMailNeo@web140001.mail.bf1.yahoo.com>
On Sat, Nov 24, 2012 at 8:07 PM, John <da_audiophile@xxxxxxxxx> wrote:
> Been using zsh for a while now and loving it. I ran into a problem today. The following script errors out if run with zsh as my default shell:
>
> #!/bin/bash
> v_build() {
>
> echo "The file is $1"
> }
>
> export -f v_build
> find . -maxdepth 1 -type f | parallel v_build
>
> Output:
> % ./test
> zsh:1: command not found: v_build
> zsh:1: command not found: v_build
> zsh:1: command not found: v_build
> zsh:1: command not found: v_build
Ur main script is indeed run by bash but parallel is trying to execute
the v_build command in your default shell.... therefore it has nothing
to do with the #! line...
Not sure how to solve this problem though....
>
> If I switch to a user who has bash as its default shell, the same script runs just fine:
>
> $ ./test
> The file is ./test
> The file is ./01.jpg
> The file is ./02.jpg
> The file is ./03.jpg
>
> Love to understand what I have incorrectly configured. It seems like zsh is ignoring the shebang telling it to use /bin/bash as the shell to run the script.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author