This article mainly introduces the shell script implementation based on SVN Code submission Statistics tool, this article directly gives the implementation of script code, the need for friends can refer to the
Nothing recently, I wrote a code
Using the Runtime.execute method, we can run Linux shell scripts in Java programs, or execute other programs Now through the Commandhelper.execute method can execute the command, the class implementation code as follows: Package
This article mainly introduced the Linux Shell Script Series tutorial (Seven): script debugging, this article explained the bash built-in debugging function and the custom debugging function and so on content, needs the friend may refer to under
The cloud-dwelling community has also made relevant articles before. Here, we recommend that you use some of the built-in functions.
String-related operations are often involved when writing a shell program. There are many command statements, such
Script Content
Copy Code code as follows:
#!/bin/bash
For i in "1" "2" "3" "4" "5" "6" "7" "8" "9"
Todo
For j in "1" "2" "3" "4" "5" "6" "7" "8" "9"
Todo
If [${j}-lt ${i}]
Then
k=$ ((i * j))
Echo-n ${i}*${j}=${k}$ ' t '
Fi
1, the use of rules
Awk is suitable for text processing and report generation, and it has a number of well-designed features that allow you to program programs that require special skills.awk syntax is more common. It draws on some of the best
Know when to use a space in bash and when not to use it.
1. Equal value assignment cannot have spaces on either side2. Spaces are required between commands and options3. Pipe on both sides of the space is optional
Let's take a look at the common
This article mainly introduces the writing shell script, uses the ICONV batch to change the file coding the script code, needs the friend to be possible to refer to under.
Usage examples:
CD ~/workspace/xxxproject
~/iconv_shell.sh./*java
One, what is awk
awk is a command under Linux, his output of other commands, the processing of the file is very powerful, in fact, he is more like a programming language, he can customize variables, conditional statements, there are loops, there
DNS load balancing is the first implementation of load balancing technology. Configuring the same name for multiple addresses in a DNS configuration file is configured with multiple A records pointing to a different IP, and the client will randomly
First, use ${}1, ${var##*/}The purpose of this command is to remove the variable var from the left side of the last '/' character and its left side of the content, return from the left side of the last '/' (excluding the character) to the right of
The function of the DF command in Inux is used to check the disk space usage of the Linux server's file system. You can use this command to get information about how much space the hard disk is taking up, and how much space is left.1. Command
problem:There are multiple execution shells configured in Jenkins, and there are subsequent execution job tasks. But one of the execute shell executions failed, causing the subsequent shell to not execute.and this failed shell doesn't have to be
Sometimes it is necessary to calculate the execution time of the command, which can be used, although the time command can be accurate to the millisecond level, but it is not possible to calculate the execution times of a heap of commands. You can
Echo-e "\033[32;49;1m [done] \033[39;49;0m"Output Result:[Done] The color of the text terminal can be generated by using the ANSI unconventional character sequence. Example:Echo-e "\033[44;37;5m ME \033[0m COOL"The above command sets the background
Special Shell variables
Test operation: Two Yuan comparison
Arithmetic comparison
string comparison
File type operations
Parameter substitution and extension
String manipulation
Summary of
Most of the article comes from: http://www.cnblogs.com/zhaoyl/archive/2012/07/07/2580749.html as a note-keeping blog memo.Both exec and source belong to the Bash Internal command (builtins commands), where you can view all the internal command
####### #认识shellThe common shell scripting interpreters on 1.unix/linux include bash, sh, csh, Ksh, and so on, which are used to call them a shell. We often say that there are many kinds of shells, actually speaking of shell script interpreter.Note:
1. ShellFor a computer, its hardware is controlled by the kernel of the system, the user wants to control the computer, it must have the means to communicate with the system core. The shell is one of the means by which the user communicates with the
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.