From owner-freebsd-questions@FreeBSD.ORG Sat Dec 15 13:54:14 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A7FC16A417 for ; Sat, 15 Dec 2007 13:54:14 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from mailout.zetnet.co.uk (mailout.zetnet.co.uk [194.247.47.231]) by mx1.freebsd.org (Postfix) with ESMTP id A7A0B13C442 for ; Sat, 15 Dec 2007 13:54:13 +0000 (UTC) (envelope-from frank@esperance-linux.co.uk) Received: from irwell.zetnet.co.uk ([194.247.47.48] helo=zetnet.co.uk) by mailout.zetnet.co.uk with esmtp (Exim 4.50) id 1J3XSz-0005d9-IQ for freebsd-questions@freebsd.org; Sat, 15 Dec 2007 13:54:09 +0000 Received: from esperance.zetnet.co.uk (54-144.adsl.zetnet.co.uk [194.247.54.144]) by zetnet.co.uk (8.14.1/8.14.1/Debian-9) with SMTP id lBFDs8iX016209 for ; Sat, 15 Dec 2007 13:54:09 GMT Received: (qmail 17027 invoked by uid 1001); 15 Dec 2007 13:54:03 -0000 From: "Frank Shute" Date: Sat, 15 Dec 2007 13:54:03 +0000 To: Giorgos Keramidas Message-ID: <20071215135403.GA16763@melon.esperance-linux.co.uk> References: <20071214010542.GA19553@demeter.hydra> <200712132012.32729.mike.jeays@rogers.com> <20071214211008.GA12935@melon.esperance-linux.co.uk> <20071215021349.GF2062@kobe.laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071215021349.GF2062@kobe.laptop> User-Agent: Mutt/1.4.2.3i X-Face: *}~{PHnDTzvXPe'wl_-f%!@+r5; VLhb':*DsX%wEOPg\fDrXWQJf|2\,92"DdS%63t*BHDyQ|OWo@Gfjcd72eaN!4%NE{0]p)ihQ1MyFNtWL X-Operating-System: FreeBSD 6.3-RC1 i386 X-Organisation: 'Esperance Linux' X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (zetnet.co.uk [194.247.46.1]); Sat, 15 Dec 2007 13:54:09 +0000 (GMT) Cc: FreeBSD Questions Subject: Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Frank Shute List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2007 13:54:14 -0000 On Sat, Dec 15, 2007 at 04:13:49AM +0200, Giorgos Keramidas wrote: > > On 2007-12-14 21:10, Frank Shute 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@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@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@kobe:/usr/local/bin$ -- Frank Contact info: http://www.esperance-linux.co.uk/misc/contact.html