There are control structures in all programming languages, and shell programming is no exception. The IF structure is the most commonly used branch control structure.
The most common if statements in Linux Shell programming are: If.....then...fi,if..
Original works, allow reprint, reprint, please be sure to hyperlink form to indicate the original source of the article, author information and this statement. Otherwise, legal liability will be held.
"13.1" What is shell script.
1 shell script is a "program" written using the function of the shell, which uses a text file to write some shell syntax and commands (including external commands) inside, with regular representations, pipeline
installation of SQLite1. First is to download SQLite, you can download this page: http://www.sqlite.org/download.htmlThe latest version is: Sqlite-shell-win32-x86-3070701.zip This is the Windows SQLite command-line management tool, which can be used
When vim modifies a file, it exits with such an error. The logs are as follows:It's not a big problem, it's just that when I got into the pit ssh, I was really taken into the pit.# 强制退出并保存:wq!No :!wq , I do not know whether the fate of the small
The error is as follows -/ ./ . the: -: toERROR cluster. Yarnclientschedulerbackend:yarn application have already exited with state finished! -/ ./ . the: -: toERROR client. transportclient:failed to send RPC8494797597505892687To/192.168.1.21:44578
Theoretical part:1, in a simple script, each of the statements executed sequentially, so as to achieve automated management,Sequential single execution is too mechanized, not "smart" enough to achieve more flexible system tasks.Example: Bulk Install
When scripting is often written in operations, most people first think of using "-eq" for comparisons when using variables intermittently, but in fact if the variable value is null (NULL) for a special reason, bash shell converts null to 0 for "-eq"
In the previous blog has been demonstrated, through scripting MySQL Universal binary installation, the following through the demonstration script to implement the source code compilation MARIADB Automation, in large-scale deployment of multiple
1. IntruductionExitmakeShell(script) to exit with a specified status value, Execute without parametersExitwhen, Shellor the script exits with the status value of the last execution command. Shellbefore exiting, Trapcan huntEXITsignal. 0indicates
On the code:#!/bin/bash#engine server Install#write by guojr#set Engine server Dirjdk=jdk-6u34-linux-x64-rpm.binchmod o+x $JDK & & Echo-e "\ n" |/$jdk;(cat >/etc /profile;source/etc/profile;Echo-e "\ n" |./$JDK; This is the most critical step. Skip
Note that this article does not involve too many configuration problems, the younger brother just to install the EDM server example to write Shellscript scripting aspects.In fact, the forum has been registered nearly 4 years, has not been good to
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
My test is basically in the Mac, and the UNIX environment test, if no special note, the default is MacWhether you see this essay as an odd trick by the shell array, or find that the shell array can do so much work in a pair of {}, it is not clear
2,WC [-LWM]
Options and parameters:
-L: only list rows;
-W: How many words are listed(English word);
-M: The number of characters;
3,Md5sum
Md5sum [Option]... [file]...
Print or check MD5. (128-bit) checksums.
With no file, or whenFile
Today, let's learn about Common Unix shell commands. We all know that Unix shell is not only a user interaction interface, but alsoProgramDesign Language: when the system registers, it will execute a Unix shell command file. profile, which will give
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service