Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I've been planning to learn linux in general and shell scripting in particular, but work/family took a lot of time. Finally, able to carve out about an hour every ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2013
    Posts
    7

    Which shell to learn? bash/ksh/sh/tcsh?


    Hi,

    I've been planning to learn linux in general and shell scripting in particular, but work/family took a lot of time.

    Finally, able to carve out about an hour every day to learn something about linux.

    Kindly request the forum members, especially the ones who are working as system admins to please let me know which shell script is more used in the production environments that they manage?

    My guess is, it would be bash, but some say that ksh is still widely used and though bash and ksh have a lot of similarities, there are differences as well.

    Please let me know.

  2. #2
    Just Joined!
    Join Date
    May 2011
    Location
    Central FL
    Posts
    91
    Eventually you'll learn bits and pieces of all of them as you are exposed to using them. That said, "sh" is the "lowest-common-denominator" across most systems. It's the same as learning text-editors - you can learn any, but when all else breaks knowing some ed or vi is always handy.

  3. #3
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,649
    Every Linux server that I have looked after has had bash as their shell, That's all nine of them in two companies. I'll let you decide if that's statistically relevant or not
    "I used to be with it, then they changed what it was.
    Now what was it isn't it, and what is it is weird and scary to me.
    It'll happen to you too."

    Grandpa Simpson



    The Fifth Continent

  4. $spacer_open
    $spacer_close
  5. #4
    Trusted Penguin Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    3,439
    As long as you are talking about linux and not-embedded environments, bash is imho the most common shell.
    On different flavours of unix and on small devices, this might not be the case.
    So it depends on your usecase, which is relevant for you.

    Other than that:
    bash scripting is surely relevant and needed today.
    It is widely used in e.g. init scripts or to glue things together.

    However, for any slightly bigger project than a init script I would recommend ruby or python for readability, feature and extendability reasons.
    You must always face the curtain with a bow.

  6. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,737
    Irithori makes some good points. In any case, a bit of history. The Linux default shell is bash (Bourne-Again SHell), which is an extension of the old Unix sh and Bourne shell. IE, sh and bourne shell scripts will work just fine in bash. Bash has a lot of nice features, such as the ability to deal cleanly with numeric variable types, defining shell functions, etc. For a lot of Unix systems, such as Solaris and others, the C shell (csh) is the default. They are similar, but different. Then there is the Korn shell (ksh) - very similar to bash. All of these are available for just about all Linux distributions. My system (a Red Hat clone) has sh, bash, and csh installed. I can also install ksh from the repositories, though these days I pretty much stick with bash.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

  7. #6
    Just Joined!
    Join Date
    Jun 2013
    Posts
    7
    Hi All,

    Thank you very much for replying. Clears a lot of confusion

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •