My configuration is the Linux, android4.2.2 SDK. The implementation details are in the code comments, and the variable name and echo content are part of the description.
The main process is:
1. The simulator that detects whether the port is
Description: The subscript for an array in the shell defaults to the 0 start
1, put the string in the array, get its length
Copy Code code as follows:
#!/bin/bash
Str= "A B--n D"
Array= ($STR)
length=${#array [@]}
Echo
=================================================
This article for Khler original, reprint must ensure that this article complete and completely retain the original author information and this article original
Oneself in the VPS do kingate service end, estimated the recent occupancy flow is too big, always be the service provider put my VPS reboot, but kingate this thing is once forced to end, is not boot, because to kingate.pid this file deleted to start,
Foreword * With the development of the whole Internet, has produced numerous big and small website, along with the user to the website UI and the speed experience also is strengthening, to the enterprise or the individual, wins the user experience
If you want to add a character after a variable, you can use the method:
Copy Code code as follows:
$value 1=home
$value 2=${value1} "="
Echo $value 2
Add the string variable you want to add {}, and you need to put $ outside.The
1 Prepare the monitoring machineLinux system, normal server can, request:Install SSH client, if you want to send SMS, also need to prepare SMS cat and install Gnokii or Gammu
2 Edit ssh_config configuration file/etc/ssh/ssh_config configuration
Create 500,000 files first
Copy Code code as follows:
Test for I in $ (seq 1 500000)
For> do
for> echo Test >> $i. txt
For> Done
1 RM
Copy Code code as follows:
Test Time Rm-f *
Zsh:sure you want to
1. Preface
Time is very important to the operating system, from the kernel level to the application layer, the time expression and precision of the same. The Linux kernel uses a constant named Jiffes to compute the timestamp. Application layer has
Linux hardware devices in the/dev directory, the optical drive is one of them./dev/cdrom represents the optical drive, the method of mounting the optical drive is as follows (in root):
Copy Code code as follows:
Mkdir/mnt/cdrom
1. The problem addressed
When you need to enter many commands at once, for example, to remove files from multiple directories at once
Copy Code code as follows:
CD Dir1
RM file1.temp
Cd.. /.. /dir2
RM-RF Dir3
When you
function can make a similar custom execution command in shell script, the biggest function is to be able to simplify many of our program code. It is important to note that the shell script is executed from top to bottom/left to right, so the
UsageParameter 1, write the text that needs to replace the path record, format: Old path old name new path new nameParameter 2, directory of files that need to be replacedParameter 3, type of file that needs to be replaced
Copy Code code as
First, the script idea
The first step is to rename the log file without having to worry about renaming the log file and losing the log when Nginx is not found. Before you reopen the log file for the original name, Nginx still writes to the file you
The code is as follows:
Copy Code code as follows:
#! /bin/bash
function Read_file () {
For line in ' cat $ '
Todo
If [' Echo $line |grep ' ^[a-za-z0-9_-]*@[a-za-z_-]*\.[ a-za-z_-]*$ "'];then
echo $line >> Result.txt
Else
All executed scripts need root identity to execute: Execute the command as root: Bash xxx.sh
Function: Automatic detection system and update sourceApplicable system version: compatible with all Linux versions on lineHow to: Execute a command as
A large number of files are required for testing, so a script is written to copy. A regular file name facilitates reference.
Copy Code code as follows:
#!/bin/sh
# file Name:batchcp.sh
# Author:zhouhh
#
We will use the common system security configuration as a shell script, only to run this shell script on the server to complete the security settings.
Linux system security Settings Shell script is the second update, has been heavily used in a
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