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

Re: Zsh as /bin/sh on Linux?

In your mail, you said:
> I don't use zsh as sh at all.  I figure that if a shell script has #!/bin/sh
> in it, I should give it what it wants.  Of course, none of *my* scripts use
> sh...!

The problem with zsh as a substitute for /bin/sh are minor incompatibilities
with sh, which (although they can even be features) can force scripts to
fail. Examples could be shwordsplit (although it might be turned on when zsh
is invoked as sh, I don't know), or subshells and pipelines (e.g. in while

Sh has many dark sides which are often heavily used, thus it is better to
leave the original sh's, or (in Linux's case) bash, which is specialized for
imitating sh's glitches.

hniksic@xxxxxxx              |  Student of electrical engineering
http://www.srce.hr/~hniksic/ |  University of Zagreb, Croatia
He didn't administer the reign of terror, just the occasional light shower.
        -- (Terry Pratchett, Sourcery)

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