#!/bin/bash
for_1 () {
echo ' for 1 show item ' for
var in item1 item2 ... itemn do
Echo ${var};
Done
}
for_2 () {
echo ' for 2 show 1~5 ' for
loop in 1 2 3 4 5
do
echo ' The value is: ${loop} '
First need to go to the System Management-> Management plug-in, select the Optional Plug-in tab, search and find SSH slaves plugin plugin, click Download installation
You may need to reboot the Jenkins after the installation is complete
You can
Redirect Method
When the shell sees
#!/bin/bash
GDB
Help
Quit
Eof
Pipe mode
The combination of the Echo, Sleep command, and pipe operator (|).
#!/bin/bash
(Echo ' root '; sleep 1; Echo ' root ') | passwd
Modify the root user's
Background: Work on a variety of online machine landing scripts, and some need to log into the board before landing on the machine, and some dynamic password, each input is very troublesome, the use of automated landing scripts to manage too
In the shell script, when comparing with parameters, such as "[$temp-eq" IPhone "]", there may be an "integer expression expected" error. This is because these parameters:-GT,-lt,-eq comparisons are both numbers and variables, so the variable temp
#shell判断文件夹是否存在 # If the folder does not exist, create a folder if [!-D "/myfolder"]; Then Mkdir/myfolderfi#shell determine the file, whether the directory exists or has permissions folder= "/var/www/" file= "/var/www/log" #-x parameter to
The Linux shell has learned several times.But the memory is not good, always forget, chase the main reason may be not common reason!Case beginning Esac EndHere's the result.Input method does not enter the symbol is wrong, the beginning of the total
Shell merge two files into one file two columns published: 2014-07-20 Editor: Www.jquerycn.cnShell merges two files into one file in two columns, providing two methods, generic shell script, awk script.The contents of the file are as follows:More
There is a period of time without crontab scheduled to perform tasks, this time to take advantage of the project implementation of the opportunity to further analyze the Crontab timing task settings encountered some difficult problems.Crontab-l View
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
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
"If syntax test condition judgment Statement" go from: http://lovelace.blog.51cto.com/1028430/1211353 "while for Loop" go from: 78681117for variable in list do Command1 Command2. Commandndone can also be written as: for Var in list; Do read the
Implementation scenario: 1. Add:& at the end of the command#/bin/Bashall_num=Tena=$(Date+%h%m%S) forNuminch`seq 1${all_num} ' Do { Sleep 1 Echo${num}}& Doneb=$(Date+%h%m%S)Echo-E"starttime:\t$a"Echo-E"endtime:\t$b"With the & symbol at the end
If you encounter this problem, write it in your own way. Here, only the relevant part is shown.
# Getting the length of an array
Array_len = "'wc-l temp2 | awk '{print $1 }''"
Temp_index = 0
Declare-A array_date
# Assign values to arrays in
Use filezilla and SSH Secure Shell client to upload and download files on Ubuntu through SSH
L use filezilla
First, start the SSH service on Ubuntu.
Sudo/etc/init. d/ssh restart
Start filezilla on Windows:
For example, if the
1. Desktop (Wireless disabled, wired dialing)
Bind the free oray domain name and the dial-up IP address (change the record ).
2. The oray client is updated in time, but the ping domain name times out.
The reason is that the binding has not
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