Implement Android automated test deployment and run shell script sharing _linux Shell

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

Shell array Common instance sharing _linux shell

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

Implementation method of implementing SSH automatic login server and batch management with expect _linux shell

ssh

Shell code: Copy Code code as follows: #!/usr/local/bin/expect Set PASSWD [lindex $argv 1] Set IP [lindex $argv 0] Set CMD [lindex $argv 2] Spawn ssh $IP $CMD Expect "(yes/no)?" { Send "YESR" Expect "Password:" Send "$PASSWDr" } "

Linux under monitoring process crashes automatically restart the shell script _linux shell after hanging off

================================================= This article for Khler original, reprint must ensure that this article complete and completely retain the original author information and this article original

Shell script implements monitoring Kingate and automatically launches _linux shell

vps

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,

Shell script Bulk purge nginx cache _linux Shell

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

A method of string concatenation in Linux shell scripts _linux Shell

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

Shell monitoring script preparation work sharing _linux shell

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

6 ways for Linux to delete a large number of files _linux shell

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

Program to get the Linux system start time method _linux Shell

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 command detailed method of mounting the optical drive _linux Shell

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

Script Shortcuts tool to simplify shell terminal command input _linux shell

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

Use function (function) examples in shell scripts _linux shell

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

File path script sharing _linux Shell in shell replacement file

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

Nginx Log Cutting shell script _linux shell

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

Shell script functions: control color, positioning, center display code _linux shell

One, control colorCode: Copy Code code as follows: #!/bin/sh function colour () { Case is in Black_green) Echo-e ' \033[40;32m ' Black_yellow) Echo-e ' \033[40;33m ' Black_white) Echo-e ' \033[40;37m '

The shell script matches the email in the file and writes it to the file. Code sharing _linux Shell

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

Ali so server Linux system update Yum source shell script _linux Shell

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

Copy the file n copies of 2 shell script code _linux Shell

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 #

Sharing of shell scripts for Linux system security (applicable CentOS) _linux shell

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

Total Pages: 541 1 .... 349 350 351 352 353 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.