I used to read some articles and learn more about them. I usually write a simple command combination, but I have never written complex scripts. Recently, I wrote a script to restore the data and found that the optical field does not work properly.
Bash concise tutorial -- variables, bash concise tutorial Variables
1. Preface
Bash is a popular scripting language in * nix systems. As a scripting language, variables are the basic elements of a language. In this tutorial, we will learn how
LinuxShell script introduction Reading Notes Chapter 1 TestI. Introduction
1. Bash (Bourne Again Shell), which is currently the default shell environment for most GNU/Linux systems.
All commands are input and executed in the shell terminal. After
Shellshock analysis CVE-2014-6271
Some time ago, the shell-breaking vulnerabilities made various companies very busy. The vulnerabilities have been around for a while, and the analysis of the Internet has also been transferred. When they stop, it's
PHP kernel exploration variable (2)-understanding references:
Introduction
Symbol table and zval
Reference principle
Back to the original question
I. INTRODUCTION
I wrote an article about references a long time ago. many of the
1 single and double quotation marks
$ Var = 12345;
Echo $ var; // print the value of $ var variable 12345
Echo '$ var'; // print the string '$ var'
Echo "$ Var"; // print the value of $ var variable 12345
?>
No matter what is in single quotes, it is
Ten good habits to use are:
1. Create a directory tree in a single command.2. Change the path. Do not move the archive.3. Combine commands with control operators.4. Exercise caution when referencing variables.5. Use escape sequences to manage long
Tag: IDT Test successfully represents the status of LIS sys file onefirst edited September 25, 2017 22:43:40SummaryI. Shell's basic syntax-variablesTwo. Shell's basic syntax-operatorThree. Process ControlHomeworkSummary todaySummaryCitation: Mr.
${} for reading, extracting and replacing strings, you can use ${} to extract the string 1, extract the file name [[email protected] log]# Var=/dir1/dir2/file.txt[[email protected] log]# Echo ${VAR##*/}FILE.TXT2, extract suffix [[email protected]
Command substitutionCommand substitution means that the shell can execute commands first, save the output temporarily, and output it where appropriate.Syntax for command substitution:' Command 'Note that it is an anti-quote , not a single quote,
Catalogue
1. List of special variables
2. Special Instructions
In the shell, variable names can only contain numbers, letters, and underscores, because some variables that contain other characters have special meanings, and such
I. If statement format: Supports if/elif/else forms, supports nesting1. When command execution succeeds (and exit status is 0), execute Command22. When the judging condition is the test command, the Command2 is executed when the result is trueif
I believe that the students running on the path of the script, can feel that the script needs to apply variables in a very wide area, simply to see the variable is simply: var=value; if we go deep into it, we can also find that the knowledge of
assignments and operations in the shell are string-handling by default, and here are a few special ways to do mathematical operations in the shell. In the future when you can see, hehe1. Examples of error methodsAVar=1+1Echo $varThe result of the
As already mentioned, variable names can only contain numbers, letters, and underscores, because some variables that contain other characters have special meanings, and such variables are called special variables.For example, $ represents the ID of
What kind of network protocol does 1.nginx use?
Nginx is the application layer I think from the bottom up, the transport layer uses the TCP/IP application layer for HTTP
FastCGI is responsible for the scheduling process
2. ? echo ' Hello
the assignment and operation in the shell is the string processing by default, here are some special methods of mathematical operation in the shell, which can be seen later, hehe1. Examples of error methodsAVar=1+1Echo $varThe result of the output
string Slices${#var}: Returns the length of the string variable var
[Root@centos6 ~]# alpha= ' echo {A. Z} |tr-d "" \ Create a variable to assign 26 letters to it, and no spaces
[Root@centos6 ~]# echo $alpha
abcdefghijklmnopqrstuvwxyz
[ ROOT@CENTOS6
The declare and typeset commands are the built-in commands for Bash, both of which are exactly the same, used to declare shell variables and to set the properties of the variables.The Declare command (alias typeset) is a shell built-in command for
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.