The ADB Shell AM command is available on the cmd command line via commands to start activity,boradcast,service, etc., and can be referenced in the following attachments.For example, in the CMD serial port we send the broadcast, the broadcast action
Conditional statements1#!/bin/Bash2 3Read-p"input your name:"name4 #第一种判断5 if["$name"=="Mike" ];then #注意这里用 [...] When comparing two strings, the variable $name quoted, and there are spaces on both sides of "= ="; "[" followed by a space; "]"
Test-judgedSee below:1 Echo " exist " Echo " Not exist "Determine if/opt/a.txt exists, output exist, otherwise output not existTest also has many uses:
A "file type" judgment about a file name, such as TEST-E filename indicates whether or not it
Example 1: After running the script, the Firefox browser is loaded automatically and the specified Web page is opened. If the user closes Firefox, the script will automatically re-open Firefox again.To end the loop, abort the t2.sh process. Be
Shell processing strings and {} operations1. Get the length of a variableThere are about 4 ways to get the length of a string: (in the case of Hello World)
Passwc -L $ echo "hello world" | wc -L 11
Passexpr length string$ expr length
Transferred from: http://blog.csdn.net/cybertan/article/details/3235722Transferred from: http://blog.sina.com.cn/s/blog_4c451e0e0100giqg.htmlScenario: Use a shell to see if a PHP program running in the background exits abnormallyIf exiting, use the
From: http://blog.sina.com.cn/s/blog_7c95e5850100zpch.htmlSuppose there is a variable var=http://www.linuxidc.com/test.htma # Intercept, delete the left character, and leave the right character. echo ${var#*//} where var is the variable name,#
Linux Shell Script Raiders notesFourth Chapter: Efficient Text Processing1, the IP address of the regular expression: [0-9]{1,3}\. [0-9] {1,3}\. [0-9] {1,3}\. [0-9] {1,3}2, grep usage//recursive retrieval of text in a multilevel directory [[email
Strings are the most common and useful data types in shell programming (except numbers and strings, and no other type works well), strings can be in single quotes or double quotes, or without quotes. The difference between single and double quotes
Recent work has been compiled shell script to the customer use, will inevitably encounter some sensitive information do not want to let customers know, so the SHC script encryption method compiled binary file submitted to the customer use, found
Overview:The process class is an abstract class (all methods are abstract) and encapsulates a process (that is, an executing program).The process class provides a way to perform input from the process, perform output to the process, wait for the
1. Download Tomcat Download Linux version (tar.gz) from http://tomcat.apache.org/download-70.cgi link2, unzip, upload and assign permissionsUnzip, use WINSCP to upload the extracted installation files to the/home/software/tomcat directoryand use
If you're dealing with shell scripts and traversing a time frame is a common thing, let's share with you today:#!/usr/bin/env bashdate1= "$" date2= "$" echo "Date1: $date 1" echo "Date2: $date 2" tempdate= ' date-d "-0 day $date 1" +%f " Enddate= '
I. Introduction of CrondCrond is a daemon that is used to periodically perform certain tasks or wait for certain events under Linux, similar to Scheduled tasks under Windows, when the operating system is installed, the Service tool is installed by
139 e-mail message will be sent automatically after the email, using this function can send the server's exception information to 139 boxes and then the phone will receive SMS reminders, to facilitate the management of the server function.To avoid
Bin/mail (BIN/MAILX) uses local sendmail to send mail by default, the local machine must install and start the SendMail service, the configuration is cumbersome and unstable.You can use an external SMTP server to send messages by modifying the
The first method:Using Shell to create users in bulk, divided into 2:1, batch-created user names are irregular; 2. batch-created user names are regularFirst, the shell of the user name that was created in bulk is irregular:First, the user names that
1. Use grep (the result is enclosed in parentheses. I wonder if I can match the content in the brackets only)
$ A = 'abc [EDG] adfirpqu '$ echo $ A | grep-O '\[. * \] '# escape [EDG] $ B = 'abc (EDG) adfirpqu' $ echo $ B | grep-O '(. *) '(EDG)
2.
Tag: String null
Integer comparison:
-EQ equals to, for example, if ["$ A"-EQ "$ B"]
-Ne is not equal to, for example, if ["$ A"-ne "$ B"]
-GT is greater than, for example, if ["$ A"-GT "$ B"]
-Ge is greater than or equal to, for example, if ["$
RHEL automatically installs the zookeeper shell scriptRHEL automatically installs the zookeeper shell script
A: This script runs on Linux RHEL6.
B, C, D,...: The machine on which zookeeper cluster is to be installed, Linux RHEL6
First, you can log
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