Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh portable script
On 2010-07-13 02:46:22 +1200, Atom Smasher wrote:
> i could start the script with:
> #!/usr/bin/env zsh
This is what I've always done. But note that it is not possible to
give arguments (options) in a portable way. However, with zsh, this
is not really useful.
Alternatively, you can start your script with something like:
#!/bin/sh
[ -n "$ZSH_VERSION" ] || exec zsh -- "$0" ${1+"$@"}
(not tested).
--
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author