1. What is a shell script?It is a scripting language, not a programming language.You can use some logical judgments, loops, and other syntax.You can customize the sub-function, which is a collection of system commands.Shell scripts enable automated
I. Logical judgments in shell scriptsIn the shell script, many will logically judge, judge a certain value, judge a file, or a directory, we do some action against the result of the judgment, if there is no judgment, there is no way to do some
A Shell script Introduction and First specification shell Script Description 1.1 Shell script Introduction What is 1.1.1 shell?The shell is a command interpreter which is responsible for directly working with the user in the outermost layer of the
Shell script programming and file system RepairGuideThe Linux Foundation has initiated the LFCS certification (Linux Foundation Certification System Administrator) Linux Foundation Certified Sysadmin, which is a brand new certification system, the
--book author Shenmon reprint please specify the source
Content Introduction
Objective
What is a shell?
Our first shell script
Run the shell script
Summarize
Part V Third lesson preview: variable in hand, shell not
I. Basic Shell syntax1. VariablesBy convention, Shell variables are composed of uppercase letters and underscores (_). There are two types of Shell variables:Environment VariableEnvironment variables can be transmitted from the parent process to the
Shell is like the editor: everyone has their own choice and tries to defend the choice and tell you why it should be used ). Indeed, shell provides different functions, but they all implement the core concept of development decades ago.
I used
Shell script programming Selection Control Structure
There are two programming languages: interpreted language and compiled language. An interpreted language is an interpreted statement that can be executed on Demand Based on the process control
Use the shell script to monitor if the process has an instance that does not exist, starting with code dry:#!/bin/shPs-fe|grep processstring |grep-v grepIf [$?-ne 0]Thenecho "START process ..."Elseecho "Runing ..."Fi#####Processstring represents a
1) Unix command:
Although any Unix command can be used in shell scripts, some more common commands are used. These commands are usually used for file and text operations.
Common command syntax and functions:
Echo"Some text": print the text on
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.