"Lead" on the Android website, the installation part of the JDK has the following requirements: The Master branch of Android in the Android Open source project (AOSP) needs to use Java 8, and OpenJDK is needed in Ubuntu.
For a lower version, refer
to write a shell program in Linux and perform the steps
Brief Introduction
I am the first time to write a blog, do not know what should be the format and precautions, please advise.
Today is about how to create a script and run it in a Linux
Execute the same command on multiple machines on a cluster because of actual development needs. For example, execute a specified script, delete files in the same directory (this is prudent ~ ~) and so on, the members of the group developed a ALLSCP (
~ Represents the current user's root directory/home/username/
/represents all the root directory
. Represents the current directory
Copy files:1. Copy Local files to remoteSCP filename User name @ computer IP: remote path2. Copy files back to local
In shell development, it's often used to date-related things, and here's how the Linux shell gets the date.
Get the current date: today= ' date +%y-%m-%d '
Get yesterday's date: yesterday= ' date-d '-1 day ' + '%y-%m-%d '
Get the date of N days
This paper mainly introduces the 4 methods of the shell reading files by line: While loop method, redirect method, pipeline method, file descriptor method.
method 1:while The most efficient and commonly used method in the loop.
The code is as
Feature Description: change the group to which the file or directory belongs.
Syntax Description:chgrp [-cfhrv][--help][--version][owned group] [file or directory ...] or chgrp [-cfhrv][--help] [--reference =][--version][file or directory ...]
1. Use shell script get_file_stat.sh statistics The number of directories in the bin directory executable file number, text file number
#!/bin/bashCd/binDir= ' ls-l |grep "^d" | Wc-l 'Exefile= ' Find/bin-perm +111| Wc-l 'Txt_file= ' Find/bin-name "*
What does it mean in the shell that we will see the symbols of $ , $, and $? Simply put is the name of the shell script that you wrote, the first parameter you wrote to your shell script, and the second parameter that you wrote for your shell script.
If the file is a. css file or a. js file, it is processed.file=$1if ["${file##*.}" x = "css" x]| | ["${file##*.}" x = "JS" x];then do somethingfiAttention:1> extract file suffix name: ${file##*.}# #是贪婪操作符, match from left to right, match to the
Depending on the Web log or the number of network connections, monitoring when an IP concurrent connection number or a short time PV reached 100, that is, call the firewall command to seal off the corresponding IP, monitoring frequency every 3
1, write script/root/bin/systeminfo.sh, display the current host system information, including hostname, IPV4 address, operating system version, kernel version, CPU model, memory size, hard disk size2, scripting/root/bin/backup.sh, can be
Definition of 1.1shell1. Stacking of Commands2. A file consisting of specific syntax and specific commandsExecute script commandbash test.sh 不需要添加执行权限,使用解释器直接解释sh tesh.sh./tesh.sh 相对路径,需要添加执行权限1.2shell Script Base---VariablesVariable: A
测试操作符
Common Test Operators
English name
Description
-F file
file
files exist and are normal files True, that is, test expressions are set
-d file
Direct Ory
Most basic: Remember the previous:#!/bin/bash, and the file suffix name is generally. shVI HelloWorld. SH #!/bin/bashecho"helloworld"Then remember to add permissions to the script, because the default is read and write permissions, default to all
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