Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Is there any magic to use ZSH in cron scripts ?
- X-seq: zsh-users 673
- From: Hrvoje Niksic <hniksic@xxxxxxx>
- To: jarausch@xxxxxxxxxxxxxxxxxxx (Helmut Jarausch)
- Subject: Re: Is there any magic to use ZSH in cron scripts ?
- Date: 06 Feb 1997 13:46:31 +0100
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: jarausch@xxxxxxxxxxxxxxxxxxx's message of Thu, 6 Feb 1997 11:50:53 +0100
- References: <jarausch-970206115053.A0110439@numa1>
- Sender: hniksic@xxxxxxxxxxxxxx
jarausch@xxxxxxxxxxxxxxxxxxx (Helmut Jarausch) writes:
> any script executed by cron is executed by the Bourne shell (on my
> machine, I don't try to replace /bin/sh by zsh)
Well, you can use "zsh scriptname" in your crontab, and zsh will be
invoked. Or, alternatively...
> #!/bin/zsh
> is not recognized when a script is executed by /bin/sh.
> The only work around for me is
> exec /bin/zsh << 'EOF'
[...]
> - the parameters to the script are lost
> Is there any magic available?
Try this:
exec /bin/zsh $0 "$@"
It should solve your problems.
--
Hrvoje Niksic <hniksic@xxxxxxx> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
I'm sure they'll listen to reason! -- Neal Stevenson, _Snow Crash_
Messages sorted by:
Reverse Date,
Date,
Thread,
Author