pdksh vs. mksh info [was: Re: Apparently,
csh programming is considered harmful.]
Frank Shute
frank at esperance-linux.co.uk
Sat Dec 15 05:54:14 PST 2007
On Sat, Dec 15, 2007 at 04:13:49AM +0200, Giorgos Keramidas wrote:
>
> On 2007-12-14 21:10, Frank Shute <frank at esperance-linux.co.uk> wrote:
> > I used bash for an interactive shell for about 5 years until I
> > discovered the goodness of pdksh. About half the size, statically
> > linked, not full of bugs and better editing features. Plus it's not
> > GPL.
>
> Hi Frank,
>
> Now that you mention pdksh, have you tried mksh (in Ports too)?
No I haven't but I'll certainly give it a look. I've just upgraded my
window manager: blackbox -> fluxbox, so I might aswell upgrade my
shell ;)
>
> I've installed it and successfully run moderately large ksh scripts
> (like the webrev(1) utility of OpenSolaris), and it is about an order of
> magnitude smaller than pdksh here:
Sounds good, thanks for the tip Giorgos.
>
> % keramida at kobe:/usr/local/bin$ ls -ld mksh bash ksh
> % -rwxr-xr-x 1 root wheel - 684699 Dec 9 19:51 bash
> % -r-xr-xr-x 1 root wheel - 2390645 Aug 31 17:07 ksh
> % -r-xr-xr-x 1 root wheel - 236202 Dec 9 18:34 mksh
Wow. My pdksh is much smaller:
$ ls -ld /usr/local/bin/ksh
-r-xr-xr-x 1 root wheel 681584 Jan 23 2007 /usr/local/bin/ksh
$ pkg_info -W /usr/local/bin/ksh
/usr/local/bin/ksh was installed by package pdksh-5.2.14p2_2
It's also statically compiled. I wonder what is bloating yours so
much. Was it built with debugging code or something?
> % keramida at kobe:/usr/local/bin$ ldd mksh bash ksh
> % mksh:
> % libc.so.7 => /lib/libc.so.7 (0x280ae000)
> % bash:
> % libncurses.so.7 => /lib/libncurses.so.7 (0x28101000)
> % libintl.so.8 => /usr/local/lib/libintl.so.8 (0x28144000)
> % libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x28156000)
> % libc.so.7 => /lib/libc.so.7 (0x2824b000)
> % ldd: ksh: not a dynamic executable
> % keramida at kobe:/usr/local/bin$
--
Frank
Contact info: http://www.esperance-linux.co.uk/misc/contact.html
More information about the freebsd-questions
mailing list