tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mksh import



,--- I/Alex (Sat, 01 Jan 2011 08:41:08 -0500) ----*
| ,--- David Laight (Sat, 1 Jan 2011 11:52:43 +0000) ----*
| | If you want to write scripts that are portable between machines, you
| | need to ensure that you only use the 'posix' features.
| 
| No: I only need to have the same version of the interpreter (Bash)
| installed on all machines.  Which is simple.
| 
| As I said, I don't care if a standards body approved a Bash feature
| -- I care about being able to do a job.  Bash being not portable would
| make me think about using a different shell but because it is more
| portable than anything else, why should I care about a "standard"?
| It works; it works well.
| 
| | If you really want portability you need to restrict yourself to the
| | 'traditional' bourne shell (eg /bin/sh on solaris).

[ On the perceived portability of /bin/sh ]

On AIX, /bin/sh is /bin/ksh, by default, and everywhere I've seen
(Bourne shell is /bin/bsh):

----------------------------------------
uname -svr; man bsh | head -n 10; for o in ksh bsh; do cmp /bin/sh
/bin/$o && echo "sh == $o" || echo "sh != $o"; done
=>
AIX 3 5

                                                            Commands Reference, 
Volume 1, a - c

bsh Command

Purpose

       The bsh command invokes the Bourne shell.

Syntax
sh == ksh
/bin/sh /bin/bsh differ: char 6, line 1
sh != bsh
----------------------------------------

-- Alex -- alex-goncharov%comcast.net@localhost --



Home | Main Index | Thread Index | Old Index