tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: mksh import
,--- You/christos%astron.com@localhost (Sat, 8 Jan 2011 16:00:26 +0000 (UTC))
----*
| >> ,--- You/Kent (Tue, 4 Jan 2011 20:41:49 -0600) ----*
| >> | Ksh93 has shown itself to be much more efficient than other shells.
| >> |
| >> | IMO mksh is not on par with ksh93 in performance
| >
| >https://docs.google.com/present/view?id=dqwmc5b_0fpv6h5
|
| All of that is very interesting, but once you "ln /bin/ksh93
| /bin/sh" you've destroyed any chance of keeping your shell scripts
| portable to the posix /bin/sh subset.
Who'd do this horrible thing?! :-)
( AIX, that's who (/bin/sh == /bin/ksh).
And Linuxes (/bin/sh == /bin/bash).)
| It is very easy for people to start using ksh93 without even knowing
| about it. Recently I had to deal with a migration from suse to
| ubuntu where in suse /bin/sh == bash and in ubuntu where /bin/sh ==
| dash. It was not pretty and even trivial things broke like 'if [
| "$FOO" == "bar" ]' vs. 'if [ "$FOO" = "bar" ]'.
...
| Now, if you don't care about portability, that is not an issue.
Using
#! /usr/bin/env bash
or
#! /usr/bin/env ksh93
actually is the way to portability (subject to the availability of
Bash and Ksh93).
#!/bin/sh
and
#!/bin/ksh
are not, having in mind what they are on various systems and the
impossibility, for a sane person, to touch those /bin/*sh files.
-- Alex -- alex-goncharov%comcast.net@localhost --
Home |
Main Index |
Thread Index |
Old Index