Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: using brackets in scripts
- X-seq: zsh-users 13989
- From: Atom Smasher <atom@xxxxxxxxxxx>
- To: Pol <xtekhne@xxxxxxxxx>
- Subject: Re: using brackets in scripts
- Date: Mon, 30 Mar 2009 00:39:59 +1300 (NZDT)
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <gqnltq$c4f$1@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Openpgp: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt
- References: <gqnfh0$t9t$1@xxxxxxxxxxxxx> <200903291445.32918.arvidjaar@xxxxxxxxx> <gqnltq$c4f$1@xxxxxxxxxxxxx>
On Sun, 29 Mar 2009, Pol wrote:
My script starts with
#!/bin/zsh
but then commands are preceded by 'sudo'
Same result if commands in script are not preceded by 'sudo', but the
script itself is launched by 'sudo' .
=================
within the script, run the commands "zmodload", "setopt" and "autoload -U
zargs", and see if you get output that makes sense in a zsh environment.
if not, the commands within your script are not being executed by zsh.
also, on your command line, check the path to zsh:
ls -lh =zsh
it might be in /usr/local/bin/zsh, which might cause the script to default
to a bourne shell, and the zsh glob tricks will fail.
if the commands are preceded by sudo, try:
sudo zsh -c ls -l save/*(.)
or, try setting "SHELL=zsh" towards the top of the script, before invoking
sudo.
--
...atom
________________________
http://atom.smasher.org/
762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808
-------------------------------------------------
"They tell us that we live in a great free republic;
that our institutions are democratic; that we are
a free and self-governing people. That is too much,
even for a joke. Wars throughout history have been
waged for conquest and plunder. And that is war in
a nutshell. The master class has always declared
the wars; the subject class has always fought the
battles."
-- Eugene V. Debs, 1918
Messages sorted by:
Reverse Date,
Date,
Thread,
Author