We help IT Professionals succeed at work.

how do shells differ?

thedogeater asked
I have been reading about how csh dos not have good input and output
control, and how sh has few features for the interactive user, what
dos this mean. Can someone show me examples of this kind of thing.

Watch Question

sh has no command history functinality and only a limited job control, csh lacks function definitions.
Don't know what should be bad with csh's input output control, except that it is hard to write STDOUT in a different file than STDERR (if somebody realy needs this).

IMHO, tcsh or zsh are the best interactive shells: most functionality for interactive control.
ksh, beside csh (tcsh) might be best for programming scripts.
bash seems to be most popular on Linux at the moment, but take care: you have to beat some unexpected dragons there, that's the price you pay for having both worlds sh and csh.

There are a lot of other shells around: ash, jsh, wsh, pdksh, sash, esh, tclsh, rsh (restricted shell), etc. etc.


hmm sh does have command line histroy when you
set -o vi or emacs. but I suppos this is newish

From http://www.eeng.brad.ac.uk/Unixhelp/Pages/shell/oview1.1.html :

                               Bourne   C    TC   Korn   BASH

command history        No        Yes   Yes Yes  Yes

command alias           No        Yes   Yes Yes  Yes

shell scripts               Yes       Yes   Yes Yes  Yes

filename completion    No         Yes* Yes Yes* Yes

command line editing  No          No   Yes Yes* Yes

job control                 No         Yes  Yes Yes Yes


Command history refers to the ability to "recall" previously typed commands which is very handy if you have to execute similar commands or if you have a complicated statement and did an error.

Command alias allows you to create custom commands, e.g. alias rm to mv -f $* ~/.trash. Thus moving your files into a trashcan.

Shell scripts is a sequence of commands you want to run. For example the startup scripts in /etc/rc.d/init.d or /etc/init.d are typically scripts.

Filename completion is the ability of the shel to guess what command you want to execute. E.g. if you want to run mysql, in some shells you type my<TAB> and the shell will show you all the commands available starting with my.

Command line editing is the stuff you do when you type a command and correct some errors before you type return, e.g. left/right keys.

And job control is the ability to move a job you started into the background so that you can start new jobs. For example tail -f /var/log/messages will show you all the message coming in through syslog. If you still want to see those, you can often use <CTRL>Z to stop the process without killing it. Then use bg to move the processing into the background. Thus you will continue to see syslog messages and also you would be able to execute other commands.

Hope this helps.
Question(s) below appears to have been abandoned. Your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, in the event new items have been created since this listing was pulled.


To view your open questions, please click the following link(s) and keep them all current with updates.

To view your locked questions, please click the following link(s) and evaluate the proposed answer.

------------>  EXPERTS:  Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
Thank you everyone.
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.

is/was there something wrong with my comment (C grade)?


well the question was
...Can someone show me examples of this kind of thing.
so you got the c grade.
Thanks for returning and finalizing your question.  Anytime you choose to grade less than an A, please comment as to why.  This helps all involved, including others who may visit this question at a later time for help.  Some experts look at grading history before deciding to help someone, so that also may have an impact to you and how quickly your future questions are answered.

The points to you are always the same, but the points granted the expert depend upon the grade.  Using 100 points as an example.  100 at A = 400 ... 100 at B = 300 .... 100 at C = 200, so it also has a point impact to the experts.  

If the grade chosen was in error, let me know, and I can correct this.  IN THE EVENT A SAMPLE IS POSTED, AND YOU WISH TO CHANGE THIS, LET ME KNOW.

EE Moderator

agreed, according to question's text (not title) I should have answered:
  man ash
  man bash
  man csh
  man esh
  man jsh
  man ksh
  man pdksh
  man rsh (HP-UX)
  man sash
  man tclsh
  man tcsh
  man wsh
  man zsh


Yes very good the man pages.
I would have given you the A
but you forgot the es shell
so that puts an end to that.
Now that the correct information has been added, may I change the grade to an A, so that others who seek this solution will access this question based on its totality?  Few will access this item in our PAQ given a "C" grade.  If is now complete.

Listening further...

Moondancer - EE Moderator


No I would prefer my initial grade to stand.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.