This article mainly introduces 2 methods of referencing and invoking another script file in the shell script, this article introduces the syntax of the two methods, then gives the actual usages and some places to pay attention to, the friend who
This article mainly introduces the Linux Shell Script series (iii): Variables and environment variables, this article explained the common variable, get the length of the string, environment variables and so on, the need for friends can refer to the
If statement formattingIf conditionThenCommandElseCommandFi, don't forget this ending.If statement forgets the end fiThree conditional expressions of Test.sh:line 14:syntax error:unexpected end of Fi if
IfCommandThen ifFunctionThenCommand executed
First, the Shell function
All scripts so far in this tutorial have been executed from beginning to end. This is good, but you may have noticed that some of the script segments are duplicated.
The shell allows a set of command sets or statements to
First, the comparison table:
The test results for the sequencing program mentioned in section I of chapter I are as follows:┌──────┬─────────┬────────┐│ Project │c│ combination language │├──────┼─────────┼────────┤│ source program length │1,363
A period of time before a batch to modify the file name, is a Debian file server, for the Mac to provide file sharing services, the Chinese part of the Use of encoding (check the data, should be, not to actually verify), the specific coding
SortThe sort command sorts the rows in the files specified by the file parameter and writes the results to standard output. If the file parameter specifies multiple files, the sort command connects the files and sorts them as a file.Sort
Vulnerability overviewApache struts is an open source project maintained by the Pachitea (Apache) Software Foundation, an open-source MVC framework for creating enterprise-class Java Web applications. An arbitrary code execution vulnerability exists
Most of the article comes from: http://www.cnblogs.com/zhaoyl/archive/2012/07/07/2580749.html as a note-keeping blog memo.Both exec and source belong to the Bash Internal command (builtins commands), where you can view all the internal command
Note: Different versions of Linux will differ, but they are very similarThe Linux command obtains the input from the standard input device (stdin) By default, outputting the result to the standard output device (STDOUT) display. In general, the
Shell Description: The command line of the operating system terminalThe shell can be understood as a command-line interface that the software system provides to the user for operation. A way of human-computer interactionWe can use the shell to
1. When a string is used more frequently in a script and the string length is long, you should use a variable instead2. Variables are essential when using conditional statements3. When referencing the result of a command, replace it with a variable4.
The IF statement determines which branch to execute by using relational operators to determine whether an expression is true or false. The Shell has three kinds of if ... else statements:
If ... fi statement;
If ... else ... fi
There are four kinds of arithmetic operations in Linux, namely expr,let,$[],$ (()).Here are the four ways to use the arithmetic operations, respectivelyFirst, the use of expr[[email protected] ~]# Expr 1 + 23[[email protected] ~]# expr 1-2-1[[email
Bash should be the most important thing we have in daily work, like our most loyal friends, and we need to know the "habits" of this friend.Bash has several different modes of operation, the login shell and the Non-login shell,interactive shell and
Recently writing a shell script, I would like to use a For loop to read the contents of the file, but found that every line in the file has a space, obviously with a for loop does not work, my intention is to read a row of the file content, so
File Checksum MatchingIf you suspect that there may be many files with the same Nevin , instead of comparing all ranks comparisons with cmp or diff , The amount of time that is spent will increase as the number of files increases to the sub-party .
Tilde expansion with wildcard characterstwo types of expansion in the shell that are related to file names . The first one is the wave number expansion . , The second type is a wildcard expansion .Wave Number expansion If the first character of the
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