Comprehensive Analysis and Discussion of Linux Shell Programming

Source: Internet
Author: User

After studying Linux Shell programming for a long time, I will discuss with you here. After reading this article, you will certainly know a lot about it. This article will teach you more things. Introduction to Linux Shell programming. wmv this section mainly introduces the definition function, function call, parameter transfer, function file, loading and deletion function, function return status, and so on:
What is SHELL, access permission and security, simple script for Linux Shell programming, and SHELL features.
Local variables, environment variables, location variables, standard Linux Shell programming variables, special variables, variable replacement, quotation marks, operators, expressions replacement, and operator priority.
Command ECHO, READ, CAT, TEE, EXEC, pipeline concept, file redirection, standard input/output/error, file descriptor.
Control structure and control statements, including if/then/else, case, for, until, while, break, and continue.
Use of text filtering, including regular expression, command sed, find, grep, and awk, merge and split.
Define functions, function calls, parameter passing, function files, load and delete functions, function return status, and so on.
Shift command and getopts command usage and use instance.
In-depth discussion of awk, in-depth discussion <-- some application instances.
Log Files, concepts of signals, trap capturing signals, eval, and logger principles.
Concept of running level, inittab analysis, and application startup.
Analysis of Several script examples, including kill_processes.sh, cpdir. sh, and menu. sh.

Shell itself is a program written in C language, which serves as a bridge between users using Linux. Shell is both a command language and a programming language. As a command language, it interactively interprets and executes user-input commands. As a programming language, it defines various variables and parameters, it also provides many control structures that are available in advanced languages, including loops and branches. Although it is not part of the core of Linux, it calls most of the core functions of the system to execute programs, create files, and coordinate the running of various programs in parallel. Therefore, shell is the most important utility for users. It is the key to make good use of the Linux system by thoroughly understanding and mastering the features of shell. It can be said that the proficiency of shell reflects the user's proficiency in Linux.

What is shell?

After a user logs on to Linux, the system initialization program init runs a shell program for each user. So what is shell? To be exact, shell is a command line interpreter that provides users with an interface system-level program that sends requests to the Linux kernel to run the program, you can use shell to start, suspend, stop, or even write some programs.

When you use Linux, you can use commands to complete the required work. A command is a basic unit of dialog between a user and a shell. It consists of multiple characters and ends with a line break. Shell explains the commands entered by the user, just as command.com in DOS does. The difference is that in DOS, command.com has only one, in Linux, there are several popular shells, each of which has its own merits. Generally, bash is used as the default shell in Linux.

  1. Linux shell programming, if statement, internal judgment Parameter
  2. One of Linux shell programming learning: What is shell?
  3. Linux shell
  4. How to use Linux Shell Variables
  5. Linux Shell metacharacters

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.