What shell do you think that is the best or what shell do you use?

What shell do you think that is the better shell or what is your favourite shell?

I think that the better shell is the Bourne Again Shell (bash), because his scripting language is most powerful than the tcsh, csh and sh, but I think that the Korn Shell is good too.

So, my favourite shell is the Bourne Again Shell (Bash). What do you think and what is your favourite shell? I have got a lot of curiosity to know.

(Forgive my bad English, I have attempted to write the better I can, if I write something bad, feel free to correct me, I hope that one day a Spanish forum will exist.)
 
In general I prefer bourne type shells over anything else. I use shells/zsh on my normal users but I have kept root's shell at the default csh(1) to avoid making a mess when updating/upgrading.
 
Mike0009 said:
What shell do you think that is the better shell or what is your favourite shell?
For me it's almost the same as @wblock: csh for root, sh for scripting and tcsh for interactive use. The former two are pretty much standard, the latter is personal preference.
 
Last edited by a moderator:
I use shells/bash for interactive use because that is often the default for most operating-systems and I can keep everything consistent without much fiddling.

My shell scripts use sh(1). I despise it when people write shell scripts in anything other than sh(1) or csh(1).
 
I vote for zsh. MIT licensed. A step up from bash in my opinion.

I also like ksh and I'm surprised since OpenBSD has it in it's main tree why FreeBSD hasn't also adopted it.
 
zsh for my personal wheel account
tcsh for a backup wheel account (in case zsh gets damaged or removed)
tcsh for the root account (backup)
zsh for the toor account (which I use for root)
sh for all shell scripts.
 
fonz said:
csh for root, sh for scripting and tcsh for interactive use. The former two are pretty much standard, the latter is personal preference.

In FreeBSD csh and tcsh is the same thing. No need to separate them.

Code:
gong:~% ls -li /bin/{,t}csh
65840 -r-xr-xr-x  2 root  wheel  382432 Mar 19 20:44 /bin/csh*
65840 -r-xr-xr-x  2 root  wheel  382432 Mar 19 20:44 /bin/tcsh*
 
kpedersen said:
I use shells/bash for interactive use because that is often the default for most operating-systems and I can keep everything consistent without much fiddling.

Most operating systems? You actually mean Linux period, don't you?

I don't work much with Solaris, AIX, HP-UX, or Irix these days, but last I checked none of them had a native bash.
 
Linux, Mac OS X, Solaris 11 and Cygwin represent the most common for me to use when not on FreeBSD which do have ol' bash as the default.

The AIX and Solaris 10 around the Uni also had bash as the default (set by the admin though).

Solaris 10 by its nature had bash (and every other shell) included in its default install. The later versions are pretty much a Linux userland anyway so again... bash :/
 
jalla said:
In FreeBSD csh and tcsh is the same thing. No need to separate them.
Force of habit aside, I've found it more convenient to think of them as two different things because on systems other than FreeBSD, they just might be.
 
ksh for interactive use and most scripts, because of it's programmability, but mainly because that's what I've got used to in 20 years of Unix.. I also use HP-UX, so need something that's the same across HP-UX/FreeBSD/Linux.

Out of interest, is there much difference between ksh93 and pdksh? I think ksh93 is some sort of official version, but noticed that OpenBSD has moved to pdksh as a default shell. Are there any views on their relative merits?
 
tcsh for my user accounts
sh for root/scripting

I don't do a hell of a lot of more complex scripting/automation these days, but if I do it's more likely to be in awk, perl or make.
 
Thought I should also add this:

The CDE project provides a version of shells/ksh93 called dtksh which has been extended to support better integration with the CDE desktop.

So you can do cool things like create Motif Windows within your scripts which is much more powerful than x11/xdialog.
 
I prefer shells/zsh for interactive, and just stick with sh for scripts.

I just exec /usr/local/bin/zsh & in my root .cshrc and get it for root. If it isn't there, all I get is "command not found"
 
I'm always late to the nice threads it seems, but then again I suppose better late than never :)

Mike0009 said:
What shell do you think that is the better shell or what is your favourite shell?
It depends on the situation.

I kept the root user on csh, although I briefly considered changing it to something else. Eventually I actually ended up preferring csh for root due to the fact that it can also somewhat "fail save" you in some cases. And although it does make it a bit harder on me to get used to setting up an iteration (for example), this also helps me keep things a bit more safe. For example:

Code:
smtp2:/home/peter $ for a in `ls`; do echo $a; done
Maildir
downloads
temp
...

vs.

Code:
peter@smtp2:/home/peter % foreach a ( `ls` )
foreach? echo $a
foreach? end
Maildir
downloads
temp
...
Although the csh session takes more commands and thus a little more time to use (for me at least, I'm a relative fast typist) it also forces you to think about the stuff you're doing. For me that's essential when using the root account, you can never be too careful with that.

For scripting I fully rely on /bin/sh. For the simple reason that I need to be sure that if I write a script for server 'A' it will also work on server 'B'. So I'm definitely resorting to the base system for that, also because I've yet to find something which I can't manage with sh.

And finally, for my personal user account I fully rely on shells/ksh93. Partly because this was my de-facto shell on the Solaris servers I used to work with, but also because ksh has always felt much cleaner to me. I personally prefer it over bash for example. Of course it helps being able to use vi blindfolded, so I'll take the ksh 'vi mode' ( $ set -o vi) over the bash history/auto complete any day of the week.
 
kpedersen said:
Thought I should also add this:

The CDE project provides a version of shells/ksh93 called dtksh which has been extended to support better integration with the CDE desktop.

So you can do cool things like create Motif Windows within your scripts which is much more powerful than x11/xdialog.

Indeed you can, I gave up on that, didn't have enough understanding. The x11/xdialog sounds interesting though.
 
Well, for scripting I use sh(1) since it is the most portable (or ported), while for interactive use after years of using bash and a light period of csh(1) I switched to zsh(1), which has a lot of advanced features and seems to me superior to Bash.

Effectively, I was surprised too to see OpenBSD having ksh in base, and in particular to see that a lot of scripting has been done for such shell (e.g., the sysmerge), while FreeBSD is stuck with csh and sh.
 
fluca1978 said:
Effectively, I was surprised too to see OpenBSD having ksh in base, and in particular to see that a lot of scripting has been done for such shell (e.g., the sysmerge), while FreeBSD is stuck with csh and sh.
Stuck may be the wrong word here. Plain sh(1) is still the most common and portable option for scripting. Do you happen to know whether the ksh scripting as apparently done by OpenBSD is compatible with sh or uses ksh specifics?
 
fonz said:
Stuck may be the wrong word here. Plain sh(1) is still the most common and portable option for scripting. Do you happen to know whether the ksh scripting as apparently done by OpenBSD is compatible with sh or uses ksh specifics?

I'm not fully sure, but the scripting done by OpenBSD folks should be ksh-ish, since they use associative arrays, that as far as I know are not available on sh. I also believe that they switched to ksh quite recently and only for some complex tasks, I don't believe all the whole scripting is done using ksh. Maybe someone here who uses OpenBSD more than me can clarify.
 
Back
Top