Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh will not run scripts as /bin/bash even with #!/bin/bash as the first line
- X-seq: zsh-users 17427
- From: John <da_audiophile@xxxxxxxxx>
- To: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: zsh will not run scripts as /bin/bash even with #!/bin/bash as the first line
- Date: Sat, 24 Nov 2012 17:07:01 -0800 (PST)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1353805621; bh=Xb/+VH4n+4WLSxOdcqv/5YRfUpAtoJXdoMYbaIaaD0c=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=M2O/oBenuRwYu+UMGb7UVePbUeJ0z0DH36D4QZrzPaJ4aHN3hxknYYdLXlLxZiACwuto2dEnfO083THiQMncRU8crEHlRaOapP9A3fGOofXMHFA6816Zevp5+T5r8duFendJGipU2DE5/+nxDJ502l+1GeBbHJJo2FMY5vHAyCo=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=IxTP2Xil9V/+mM5qp+adSXRs5/6MLUNEq4QcIDLyReCfbiZe4ds1nVsZ4CyFtqQmkAmrsPgZbWDKGAtiiWT7wDaRmBUkK5BWuC+9W/GmkJa7mstzuZPfJf0PFQj3pvyXQTrctmCnrsy1yVF+1BzJXYytZo+kMz0RCmegkZ/Sev8=;
- 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
- Reply-to: John <da_audiophile@xxxxxxxxx>
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
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