From owner-freebsd-questions@FreeBSD.ORG Mon Dec 17 07:43:05 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 E6C0616A417 for ; Mon, 17 Dec 2007 07:43:05 +0000 (UTC) (envelope-from jurjenm@stack.nl) Received: from mx1.stack.nl (meestal-mk5.stack.nl [IPv6:2001:610:1108:5010::149]) by mx1.freebsd.org (Postfix) with ESMTP id AE8D013C461 for ; Mon, 17 Dec 2007 07:43:05 +0000 (UTC) (envelope-from jurjenm@stack.nl) Received: by mx1.stack.nl (Postfix, from userid 65534) id 7B1D1447BC; Mon, 17 Dec 2007 08:43:04 +0100 (CET) X-Spam-DCC: debian: toad.stack.nl 1169; Body=1 Fuz1=1 Fuz2=1 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on toad.stack.nl X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.2.3 X-Spam-Relay-Country: NL Received: from jurjen (wlan-197193.nbw.tue.nl [131.155.197.193]) by mailhost.stack.nl (Postfix) with ESMTP id 2479E4011C for ; Mon, 17 Dec 2007 08:42:53 +0100 (CET) Received: by jurjen (sSMTP sendmail emulation); Mon, 17 Dec 2007 08:40:51 +0000 Date: Mon, 17 Dec 2007 08:40:51 +0000 From: Jurjen Middendorp To: FreeBSD Questions Message-ID: <20071217084051.GA1121@s062107.tue.nl> Mail-Followup-To: Jurjen Middendorp , FreeBSD Questions References: <20071214010542.GA19553@demeter.hydra> <200712132012.32729.mike.jeays@rogers.com> <20071214211008.GA12935@melon.esperance-linux.co.uk> <20071215021349.GF2062@kobe.laptop> <1197850883.4230.3.camel@tomcat.straycat.dhs.org> <4765EC7E.6050704@chuckr.org> <1197866090.6951.6.camel@tomcat.straycat.dhs.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1197866090.6951.6.camel@tomcat.straycat.dhs.org> User-Agent: Mutt/1.4.2.3i Organization: FOTLP (Federation Of Terribly Lazy People) 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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Dec 2007 07:43:06 -0000 On Sun, Dec 16, 2007 at 11:34:50PM -0500, Tom McLaughlin wrote: >On Sun, 2007-12-16 at 22:26 -0500, Chuck Robey wrote: >> Tom McLaughlin wrote: >> >> Now that you mention pdksh, have you tried mksh (in Ports too)? >> >> >> >> 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: >> >> >> >> % 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 >> >> % 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$ >> >> >> > >> > I've maintained a port of OpenBSD's pdksh for some time but I've never >> > committed it. Think of pdksh but still actively maintained. >> > >> > http://people.freebsd.org/~tmclaugh/files/openksh/openksh-4.2.shar >> > >> > [tom@releng-7-fbsd tom]$ ls -al /usr/local/bin/ksh >> > -r-xr-xr-x 1 root wheel 192032 Dec 16 18:22 /usr/local/bin/ksh* >> >> If you're familiar with pdksh, are you also familiar with ksh93, which >> is (I believe) Mr. Korn's own shell? If you are, I would be interessted >> in your opinion of the two, any comparisons you might give. > >I've never used ksh93 so I really can't say. There is a NOTES file >included with pdksh which gives a starter. I created this port a few >years ago because of some random issue I've long since forgotten with >pdksh on my FreeBSD box which didn't happen on my OpenBSD box. > >tom I never used pdksh, but am using ksh93 for quite a while now and have used bash, too. For some reason i like it better than bash, the vi mode is a bit better somehow, it feels alot sturdier. It doesn't have those special variables like $! and !! i believe, but it has alot of neat features like basic network programming, lots of parameter expansion stuff and is just a very nice shell :) -jurjen