Why not just use sh?
Автор утилитки execlineb написал хорошую заметку о том, почему стоило бы избегать шелл.
Сохранил копию странички.
Цитатки:
Security
…Parsing is a complex operation, and it is easy to make mistakes… shells parse all the time. Worse, the essence of the shell is parsing…
Portability
…The ash, bash, ksh and zsh shells all exhibit a different behaviour, even when they are run with the so-called compatibility mode. From what I have seen on various experiments, only zsh is able to follow the specification to the letter, at the expense of being big and complex to configure….
…This is a source of endless problems for shell script writers, who should be able to assume that a script will run everywhere, but cannot in practice.
…specification is insane. It goes against every good programming practice…
…POSIX cannot really be blamed for that: it only normalizes existing, historical behaviour…
…modern shells have to be compatible with that historical nonsense and that makes them big and complex at best, or incompatible and ridden with bugs at worst…
Notes mentioning this note
There are no notes linking to this note.