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
In the previous article introduced the Shell to judge the various versions of Debian methods, in the actual use, the judge system is 32-bit or 64-bit is often used, today to introduce the content.
Manually view the number of system digits
To view
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
A name to know what PcAnyWhere mean, PcAnyWhere is a set of established remote control software, can run under windows95/98/nt/2000/me. Users can remotely manage computers connected to the Internet or the intranet through a master or a controlled
First, define the shell function (define functions)
Grammar:
[Function] funname [()]{Action[Return int;]}
Description
1, can be defined with function fun () or directly fun (), without any parameters.2, the parameter returns, may display adds:
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
Before data transfer, SSH will encrypt the data that needs to be transferred, ensure the security of the session security, the SSH client also contains a remote copy SCP.1, the structure of SSHSSH service is composed of server Software (OPENSSH) and
Main introduction vim, Nano, emacs,kwrite,kate,gnome10.1 vimUnix System's original editor10.1.1 Check VIM PackageFigure out what kind of VIM package your Linux system is using.Under the Wu ban map:$which VI$readlink –f/usr/bin/viREADLINK–F * * * can
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
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
In this chapter we'll look at a seemingly trivial detail-our shell. This examination would reveal some of the inner working of the shell and the terminal emulator program itself.Many things in linux,the shell prompt was highly configurable,and while
First, Templates filterFilters are part of the Django template languageModify variables in a template to display different content{{value | filter}}Example: {{list_nums | length}} indicates the length of the list{{Value | filter | filter | filter}}
The printf command mimics the printf () program in the C library.Standard, so scripting with printf is better than using echo portability.printf uses reference text or space-delimited parameters, which can be used outside of the format string in
####### #认识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:
#!/bin/bash#author:yanconggod#date:2017-01-19#version:1.0# using uptime command to monitor system load postfix_path= "/usr /sbin/postfix "mailx_path="/usr/bin/mailx "email=" [email protected] "# get native IP address ip= ' IFCONFIGENP2S0 |grep '
1. When a string is used more frequently in a script and the string length is long, you should use a variable instead2. Variables are essential when using conditional statements3. When referencing the result of a command, replace it with a variable4.
Command-line argumentsThe most basic way to pass data to a shell script is to use command-line arguments, which allow you to add data values to the command line when you run the scriptReading parametersBash Shell assigns some special variables
Security code: Waves will sometimes, straight hanging cloud sail sea Shell scripting App (iii)Foreword: It is difficult to write all the code in sequential order when it is hard to satisfy the requirements when facing various lists and repeating
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