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
Shell basic syntax
Basic shell Syntax:Like advanced programming languages, shell also provides instructions and functions for using variables.For shell, the value of all variables is a string, and the shell program uses $ VaRReference the value
A, Shell conditional statement (if usage)
If statement structure [IF/THEN/ELIF/ELSE/FI]
Copy Code code as follows:
If condition test statement
Then
Action
[Elif condition
Action
Else
Action
]
Fi
If
Logical judgments in shell scripts
Format 1:if condition; Then statement; Fi (Common)
#以命令的方式表达[[email protected] ~]# for i in `seq 1 5`; do echo $i; done12345[[email protected] ~]# for i in `seq 1 5`> do> echo $i>
--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
[Shell] example of if, for, while flow statement and integer string comparison, shellwhile
Preface:
In fact, Shell is a command interpreter that explains the commands entered by the user and sends them to the kernel. In addition, Shell has its own
When we talked about the number of scripts being executed in CU a few days ago, we found that we knew little about how to execute commands in shell... thank you for your advice! In addition to being inaccurate in some places, his statement is
Old boy new book Shell programming Real-time scheduled to start (scan the QR code to purchase the regular package of mail), dear friends, keep you waiting. Computer User Poke Computer Purchase linksNote: Package parcel post 3 months (after 2017
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
Bourne shell
Introduction: Bourne shell basics and many other useful features, shell programming and organization.
Main content:Basic Introduction to. Shell, environment, options, and special characters. Shell variables User-Defined variables,
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.