Linux entry fourth day--shell basics

Source: Internet
Author: User
Tags control characters

First, shell overview

  1. Overview

command-line interpreter   (shell, which is our operating interface), the computer only knows 0101 binary, we need to use the ASCII table to translate

  The more official explanation is:

The shell is a program written in C that is a bridge for users to use Linux. The shell is both a command language and a programming language.

A Shell is an application that provides an interface through which users access the service of the operating system kernel.

  

    2.shell classification

    • Bourne Shell (/usr/bin/sh or/bin/sh)
    • Bourne Again Shell (/bin/bash)--Standard Shell,bash
    • C Shell (/USR/BIN/CSH)
    • K Shell (/usr/bin/ksh)
    • Shell for Root (/sbin/sh)
    • ......

Second, the script execution mode

  Let's start with a few related commands:

1. output command :Echo

  Example 1:

the-e option allows you to control the format by using control characters :

  Example 2:

  Other echo features, such as output hex, output color, etc. are not expanded here

  First shell script

  #! is a contract tag that tells the system what interpreter the script needs to execute, even if it uses a Shell.

The second line is a comment, followed by the script content, here is the output

Linux entry fourth day--shell basics

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.