Integer two-dollar comparison operator
The comparer used in [] and test
The comparer used in (()) and [[]]
Description
-eq
= = or =
Equal abbreviations, equal
-ne
!=
Not equal
Man test can see the string -n string the length of STRING is nonzero STRING equivalent to -n string -z string the length of string is zero STRING1 = STRING2 the strings are equal
In order to simplify the deployment complexity of Tomcat, the previously individually configured script was presented as a parameter that can be used for multi-tomcat instance management in a stand-alone environment.Where the Deploy feature will
SortHandle sorting problems.For example: Sort-r/file the rows of file in descending order.Tr:As a simplified version of SED, you can replace another character with one character, or delete some characters.CutSplitting according to the line of the
1. StartCD /bin$./start-hbase.sh2. Start HBase Shell# Find Hadoop-hbase DFS filesHadoop fs-ls/hbase#start ShellHBase Shell#Run a command to verify this cluster is actually running#List3. Logs ConfigurationChange the default by editing
Shell script loops over TV channel scripts#!/system/bin/shtime=$1if [[$time 0]]doecho ' run times $time "Input keyevent 166input keyevent 166input keyevent 167let" time--"Doneecho" Run End "fi Shell Script Switch TV channel
In short, this technique corresponds to a scenario such as the followingAssume that there is text such as the followingccccaaaabbbbddddbbbbccccaaaaIt needs to be re-processed now. This is very easy,sort-u, but suppose I want to keep the text in its
"Input_dir" represents the current directory, "Output_file" represents the output file, you can make your own changes according to the situation,1#!/bin/Bash2 functionGetdir () {3 forElementinch`ls$1`4 Do 5dir_or_file=$1"/"$element6
The importance of the shell is self-evident to every system adminstrator. Today Allah is here to talk about the acid and cool shell programming of those years.let's start with an entry-level programming example. By the way with the Dora of Allah's
#! /bin/bashShebang is a line of text where #! Before the interpreter path,/bin/bash is the Interpreter command path for bash.There are two ways to run a script, one is to use the script as a command-line argument for bash, and the other is to grant
What is a Linux Shell
A shell is a user program, or an environment that is provided for the user to interact with the system.It is a language interpreter that executes commands that are read from a standard input device, has its own built-in shell
Start specifying the script interpreter# !/bin/bash or #!/bin/sh
Opening plus copyright information#Date: 2017-8-01 22:50#author:yang Qiang wei #Mail: [email protected] #Funtion: This is delete ... #version: 1.0
No Chinese comments in
1. Write a loop to ping the IP of the entire subnet. using the while loop#!/bin/bash ip=223 While ["$ip"-ne "239"]do ping 121.201.0. $ip-c1 && echo "121.201.0. $ip yes" >> Ip_list.txt | | echo "121.201.0. $ip No" >> ip_list.txt ((ip+=1)) doneuse for
Tag:expr bsp Command not csharp other filename line awk Shell Learning notemain= "/usr/local/" # Variable uppercase status= "$MAIN/status" # USD multibyte string is a reference variable value, while USD multibyte number
(1)Monitoring 80 Ports Write a script to determine whether the 80 port of the machine is open, if you do not do anything, if you find that the port does not exist, then restart the httpd service, the concurrent mail notify yourself. Once the script
Use the time of the Linux system in the second 1-59 to guess the number game, the detailed code is as follows:#!/bin/bash#author wangning#date 2017-7-15#qq 1198143315#email [email protected]##### ############################## #define color#########
Functions are often used when writing programs, and general development tools have a rich library of functions. But sometimes you need to customize the function to meet our needs.In Linux, the same is true for shell scripts, which sometimes use
Data flow redirection is the transfer of a command that should appear on the screen to other places after executionStandard1, standard input (stdin): code 0, using or 2, standard output (stdout): Code is 1. , using > or >>3, standard error output
1. Demandfind all unused IPs in a 192.168.0.* network segment2. Realize We know that finding methods that do not use IP can be done using the ping command. For a single IP judgment, use the following command$Ping-C1 192.168.0.1PING192.168.0.1(192.168
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