Open GoogleCodeExporter opened 9 years ago
I'm not opposed to this idea, but I don't currently plan to change it. I'm not
expert enough on all the variations in shell syntax. I'm sure "." is available
in most if not all shells, but what about conditionals and switches? Is that
the same between bash, csh, zsh, fish, etc, etc? I'm not totally sure.
Original comment by James.Mo...@gmail.com
on 26 Feb 2015 at 2:17
well, /bin/sh on all systems I know is either ash, ksh, bash or dash (all sh
compatible). If it would be a shell with non-sh-like syntax even the
boot-process would fail as it does depends massively on sh scripts. E.g. look
at /etc/init.d on Ubuntu. Most of these scripts using /bin/sh (= dash on
ubuntu) as interpreter.
for a overview on what's defined in the sh language, look here:
http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html
TL;DR: Most syntatic features from bash are available in sh, with a few
differences like substrings in variables, etc. Nothing you would probably need
in an init script.
Another option would be to use #!/usr/bin/env bash - which, while not POSIX
compliant, works on every half-way modern unix system and calls the bash from
their correct path (e.g. on FreeBSD /usr/local/bin/bash, if installed from
ports).
Original comment by oliverk...@gmail.com
on 2 Mar 2015 at 2:49
Original issue reported on code.google.com by
oliverk...@gmail.com
on 29 Jan 2015 at 8:53