Shell and scripts under Linux

Source: Internet
Author: User
Tags perl script

1. various Unix shells

The shell of Linux is basically developed from the shell in the UNIX environment, and posted on the wiki: which we commonly use, can be categorized as Bourne Shell (/usr/bin/sh or/bin/sh), Bourne Again Shell (/bin/bash), C Shell (/usr/bin/csh), K Shell (/usr/bin/ksh), Shell for Root (/sbin/ SH), etc.

The first UNIX shell was implemented by Ken Thompson, modeled after the shell on Multic, called Sh.

Bourne Shell Compatible
    • Bourne Shell (SH) Steve Burn was written at Bell Labs. 1978 first release with version 7 Unix.
      • Almquist Shell (ASH)
      • Bourne-again Shell (bash)
      • Debian almquist Shell (dash)
      • Korn Shell (ksh) David Korn was written at Bell Labs.
      • Z Shell (zsh)
C Shell Compatible
    • C Shell (CSH) Bill Joy was written at the University of California, Berkeley. 1979 with BSD first release.
      • Tenex C Shell (tcsh)
Other
    • Fish, first released in 2005.
    • Shell of RC Shell (RC) Nineth project system, written by Tom Duff at Bell Labs. Then migrate back to Unix and other operating systems. SCSH (Scheme Shell)
      • Es Shell (es) is a functional programming RC-compatible shell, written in the mid 1990s.

2. Perl, Python, shell scripting differences

Strictly speaking, the shell is not a programming language, but the shell has its own control flow structure (judgment, looping, selection), operations and functions, and other programming language features, together with the shell commands organized together to form a script, can do things in the general programming language.

Perl and Python are strictly programming languages compared to the shell. Functionality is a lot more complex than the shell, and it's a little more complicated in syntax.
The biggest advantage of Perl is its string pattern matching capability, which provides a very powerful regular expression matching engine. However, the ambiguity of the Perl language and the overuse of symbolic grammar make interpretation difficult. These grammars are not the essence of the beginners, for their learning to bring a small obstacle. Usually you have to turn to a reference book when you want to read a Perl script written a few months ago.


The foundation of System Management is the shell, which depends on the shell's role as a bridge. It can be said that shell scripts can accomplish almost all of the automation tasks under Linux.

Perl/python dealing with some problems may be simpler and more efficient than the shell, which can be said to be an advanced means to improve the management level of the system.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.