LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-10-2015, 11:57 AM   #1
Nexusfactor
Member
 
Registered: Jan 2015
Distribution: Ubuntu
Posts: 50

Rep: Reputation: Disabled
Linux Shell Scripts Explanation


So, I've been learning bash scripting, and I was doing research when I came across Ksh,Bourne Shell, Dash, and Zsh. I'm very confused and researching the matter made me more confused.

1. What exactly are Ksh,Bourne Shell, Dash, and Zsh?
2. Should I be learning these instead of regular bash scripting?
 
Old 02-10-2015, 12:10 PM   #2
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
See wikipedia articles on those for some info.

Bourne shell is the oldest of them.
Ksh is liitle recent than Bourne.
dash, zsh and Bash are more recent ones.

By default on most linux systems the GNU Bash is installed and used.

It's best to learn bash as many programs in linux use bash as shell scripting language.
Dash is a more posix conforming shell than bash. Bash has been replaced by dash as the /bin/sh shell in debian and ubuntu.
Zsh has more features than bash.
Bourne and Ksh are not used much in Linux.
 
1 members found this post helpful.
Old 02-11-2015, 10:17 AM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
veerain's answer is spot on and unless you're interested in historical accuracy or one of those people who need to know all, experience all, I personally would not bother with those other shells. They generally are all similar with subtle differences, some small, some large; but BASH is a good, best one to gain expertise on.

Similar to the C language. You can't go wrong by learning that and knowing it would help you with other languages which are very close extensions of that language. Same comment for BASH even though bash was not the first, but it still contains most, if not all, of the shell capabilities that you'll need.
 
Old 02-12-2015, 07:55 AM   #4
Bill Melater
Member
 
Registered: Apr 2012
Posts: 31

Rep: Reputation: Disabled
You didn't run across csh? Lucky you! j/k

In the commercial Unix world, there were 3 shells: sh, csh, and ksh.

Sh, or Bourne shell, is the original Unix shell. Most shells can run bourne shell scripts.

Csh, however, is a completely different animal. C shell is used on BSD oriented Unices. It has scripting constructs that resemble the C programming language.

Ksh, or Korn shell, introduced powerful things like command line editing using popular file editor keystrokes such as emacs or vi. Ksh was developed at Bell Labs as an experimental tool on AT&T Unix. The source code was not available in the public domain.

Bash is essentially the Linux implementation of ksh. It also has many technological improvements. But, basically, it's ksh without the ksh source code.

I've never used dash or zsh, so dunno for sure about those. I think they pre-dated bash. In the old days, everybody wanted ksh, but couldn't get it. Thus, people wrote shells that approached it or csh. IMHO, Bash exceeded ksh and is the best.

Hope this helps.
 
1 members found this post helpful.
  


Reply

Tags
linux, shell scripting, terminal



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux gurus - need an explanation for the following shell commands sequence neo77777 Linux - General 2 02-11-2008 02:47 AM
Linux commands in shell scripts james_cwy Linux - Newbie 4 11-10-2003 01:14 AM
shell scripts in linux dopper Linux - Software 3 10-05-2003 05:12 PM
using shell scripts with modem under linux gkrumins Programming 2 06-06-2002 01:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration