# Solved: ksh vs. bash



## needsleep (Sep 27, 2005)

I'm used to HP-UX ksh. I recently installed a copy of redhat ent linux 3 on my PC - I know, its out of date, but that's where I am. Can I "do everything" I need to do in ksh, or should I take the time to learn bash? Are they much different?


----------



## Squashman (Apr 4, 2003)

I really wouldn't say Rh3 enterprise is out of date. I have not worked much in KSH but from helping others use it I find that it lacks in alot of features that BASH has. Hard core KSH will tell you that it is more stable than Bash.


----------



## tsunam (Sep 14, 2003)

ZSH all the way  Great little shell, that doesn't lack BASH stuff but in fact improves on a good bit.


----------



## Squashman (Apr 4, 2003)

tsunam said:


> ZSH all the way  Great little shell, that doesn't lack BASH stuff but in fact improves on a good bit.


Hmm, never heard of that one. I might have to try it out.


----------



## O111111O (Aug 27, 2005)

Good table of differences below.

http://www.faqs.org/faqs/unix-faq/shell/shell-differences/

There are some subtle differences. If you're a crusty KSH scripter (like me), you'll see some issues crop up. Have alot of kshell scripts that poll devices for portcounts and insert into perl DBI connector, biggest thing I've found have been syntax (set, export, for, array, etc.)

FYI, you can compile BASH for HPUX 11x, Solaris 8,9,10.

My peers give me a hard time quite a bit (i.e., "good to see you're using something out of the 90's!).....


----------



## needsleep (Sep 27, 2005)

Thanks to all for their inputs.
Squashman - I found a gold mine in your "How to ask questions ..." piece!
FAQ is really what I needed. Probably a lot of other stuff in there I will read too.


----------



## tsunam (Sep 14, 2003)

Squashman, if you want some stuff for your .zshrc let me know. A bit of it is gentoo specific etc but will work for other things so


----------

