Use this command to start activity, services, send broadcast, etc. from the cmd console:C:\USERS\ADMINISTRATOR>ADB Shell AM usage:am [subcommand] [options]Start an activity:am start [-d] [-W] -d:enable debugging-w: Wait for launch to
The Shell profile:When a new interactive shell is started,/etc/profile, followed BY/ETC/BASH.BASHRC (if aBash shell), ~/.profile, and finally ~/.BASHRC is executed in that order.PATHcan set your pathenvironment variable to tell the shell where to
#!/bin/bash while ifs=: Read name1 name2 name3 name4 #IFS是从文件读取内容时指定的分割符号, assign the contents of a to the corresponding variable in separate sections. Do echo $name 1 ' | ' $name 2 ' | ' $name 3 ' | ' $name 4 done Linux commands (use of the
First, the Logical volume label
Logical Volume Label
Express meaning
1.
About the file and directory of the detection of Logical volume label!
-F
Common! Detect if "Archive" exists eg:if [-f
List of special variables
variables
meaning
$
File name of the current script
$n
Arguments passed to the script or function. N is a number that represents the first few parameters. For
1.zookeeperZookeeper can be used to ensure data transaction consistency between the data in the zookeeper cluster2. Start the cluster and checkStart on each machine separately./zkserver.sh StartCheck Status./zkserver.sh Status3. Client starts shell
Online check a lot, no effect, wrote a, although a bit, but the function can still be realized. Talk less, look at the shell.#!/bin/shfunction main {lines= ' Ps-eo user,pid,cmd | grep-v root |grep sshd '; tmp=0;array= (); for i in ${lines[*]}doif [$
first, the initial knowledge of the scriptShell: A class of interpreter between the system kernel and the user.Scripts: A class of files that are executed in a preset order using a specific languagebatch, macro, and interpreter programsTo create a
As a small scripting language, LUA functions can be run and debugged using shell commands, and here are a few common shell commands. Basic format is LUA [option parameter] [script parameter](1)%lua program name. LUA--run the LUA program
Because spark-1.3 as a milestone release, add a lot of features, so, it is necessary to study a, spark-1.3 need to scala-2.10.x version support, and the system on the default Scala version of 2.9, need to upgrade, You can refer to Ubuntu to install
First, Grep,egrep,fgrep1) grepFormat: grep [options] [mode] [file name]Common options:-N: Display line numbers and matching rows-V: Reverse match-C: No matching rows are displayed, only the number of matching rows is displayed-I: Ignore case-R:
1. Give a file with IP , one IP line, to count which IP has the most occurrences. Ip_input.txt content is as follows:219.217.49.14175.43.4.8787.48.98.159.73.38.25219.217.50.1459.92.48.32219.217.49.1459.72.38.14259.73.38.25219.217.49.14The following
Very depressed, do not know what the reason, on the virtual machine to get that, the Centos6.5 seems to make a problem, the use of SSH remote landing on the CentOS, only show:bash-4.1#, very strange, whoami the root permissions displayed, PWD
Shell scripting is like a language, involving the environment, basic syntax, variable definitions, functions, parameters (System parameters), condition determination, execution Process control, and so on.This article describes the following aspects:
Login Shell and Non-login Shell:Login Shell: When you get the shell, you need a full login process. such as: Tty1~tty6 login, you need to enter a user name and password. The shell you get at this point is called loginShellNon-login Shell: When you
The library to be backed up, passed in as an argument, delete the backup file from the previous 30 daysThe backup directory is created if it does not exist,/back/mysql/#!/bin/bashDatabase=$1Username= "Root"Passwd= "Redhat"Backupdir=
A simple paragraph was written in the shell.Energy.sh content:#!/bin/Bashhost=127.0.0.1User=******passwd=******dbname=******TableName=Device_value_300sct007p01_yearmonth=$(Date+%y-%m) sqlstr="INSERT INTO Device_value_300sct007p01_year (id,year,month,
In the process of learning the algorithm, we will inevitably touch many and sort-related algorithms. All in all, the basic sorting algorithm must be mastered for any programmer.Starting today, we're going to be explaining the basic sorting algorithm.
Run the system command and write the shell script that writes the output to the specified log file (2 ),
The previous article was a simple script that can be executed and written into logs. However, if it is placed in the production environment, it
Shell scripts that execute system commands and write output to log files
This is probably the requirement. Run the usysfault command on the aix system to retrieve the fault light information. However, it seems that only the root user can execute
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.