Date: Thu, 20 Dec 2007 14:03:31 +0000 From: Jurjen Middendorp <jurjenm@stack.nl> To: Chuck Robey <chuckr@chuckr.org> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: pdksh vs. mksh info [was: Re: Apparently, csh programming is considered harmful.] Message-ID: <20071220140330.GA1100@s062107.tue.nl> In-Reply-To: <4766DCE6.6000902@chuckr.org> 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> <20071217084051.GA1121@s062107.tue.nl> <4766DCE6.6000902@chuckr.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Dec 17, 2007 at 03:32:38PM -0500, Chuck Robey wrote: >Jurjen Middendorp wrote: >>>> 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 -----------------^ i ment !$ offcourse :) >>basic network programming, lots of parameter expansion stuff and is just a >>very nice shell :) > >I havre installed it, and played with it a bit, I admit it's nicer than >sh (and I *think*, bash) but the reason I haven't tried using it >regularly is because I can't find a nicely set up .kshrc ... if you have >one, I'd appreciate a copy. Might be nice, if it's not terribly long, >to post it to the list, too. Basically it's just like any other shell .*rc. It sets some environment variables for stuff, a bunch of aliases and some functions i find useful myself, or am too lazy to throw away. Nothing really ksh-specific, except maybe some of the functions i wrote use ksh-stuff like arrays, but that's not really ksh-specific as well. You could use google to find any .*rc for sh-like shells and copy those (or get a copy of unix power tools, it's a nice book to make you feel at home in a shell) -jurjen ps. these functions i probably use the most :) alias d="do_in_bg dillo" alias x="do_in_bg xpdf" alias ff="do_in_bg firefox" #do a program in the background: do_in_bg() { "$@" > /dev/null 2>&1 & } #open a webpage from disk, like: $cd /usr/share/doc/en && htm #to look at all the (english) freebsd-docs :) htm() { set -A stuff $(find -L . -name "index.htm*" -print) (for ((i=0; i < ${#stuff[*]}; i++)); do print "$i \t: ${stuff[i]}"; done) | $PAGER read x && d ${stuff[$x]} }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071220140330.GA1100>