Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: #!/path/to/arch-indep/zsh -f



On Sep 21,  6:23pm, Clint Olsen wrote:
} Subject: #!/path/to/arch-indep/zsh -f
}
} I decided to change my script to reflect the copy of my shell, and attempt
} to direct it to the path of my zsh wrapper itself causes the script to
} misfire when it is executed from *csh.

And the error you get is something like "exec format error", I suppose.

Most (I don't know if I can say "all") operating systems won't do two
levels of indirection via #! lines.  That is, if the thing on the #!
line is not itself a binary in executable format, the OS will not
recognize yet another #! line and launch still another interpreter.

The workaround is to write your wrapper in C and compile it.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



Messages sorted by: Reverse Date, Date, Thread, Author