echo Color output position parameter variable a predefined variable read accept script arguments enter declare source command
echo Color Output
I just found out today . Echo can also output a string with a color :
Echo-e "asdasd\e[1;32m ABCD \e[0m"
Source:
Public StaticString CreateFile () {String cmd ="Echo\"Hhahah\"> F:\\AAA\\Azzz.txt "; File File =NewFile ("C:\\Windows\\System32 "); StringBuilder result =NewStringBuilder ();Try{//execute the specified string command in a separate process
To sort an integer element in the ArrayList collection in ascending order:
Package org.hyp.test; Import java.util.ArrayList; Import Java.util.Random; public class Mysort {private arraylist list, public arraylist getlist () {return list;} PU Blic
When using the shell under Linux, the array is occasionally used for convenience. The array is declared in the following way:
array= (element1 element2 element3 ... elementn)
That is, wrap the array elements of the parentheses package together,
When executing a pre-existing shell script file under a Linux system, it prompts you that the file does not exist.
The general reason for this is that your shell script is written in a system that is inconsistent with your execution script, such as
http://kingphp.blog.163.com/blog/static/200423244201361632639594/
When you start a program with bash, you can use it after the program, and the implementation program runs in the background;
For example: Emacs &
But if you forget to enter &; but
The most recent project needs to execute shell commands in Java, in the most common way, with the following code:
public class Shellutil {public
static string Runshell (String shstr) throws Exception {
process process;
Process =
Attached below by
ShellThe way the command line does not interactively manipulate the database:
mysql-hhostname-pport-uusername-ppassword-eMySQL-related SQL statements, do not run MySQL in the MySQL prompt, that is, you can operate MySQL in
Introduce a file in a makefile file by using include
Include $ (shell./getname)
and the contents of the GetName are as follows:
pwd=$ (PWD);
if ["${pwd#*/zloader.}" = "$pwd"];then
Echo Makefile.cpci
Else
echo Makefile.${pwd#*/zloader.}
fi
I've
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
Reprint: http://blog.chinaunix.net/uid-27571599-id-3473078.html
Many people have asked me how to write shell script, how to achieve the same time to upload files to three FTP servers, how to detect the three servers are alive and so on, in fact,
The I-III section deals only with bash ...
For others, see section IV ... I: The use of obase, IBase and BC: IBase is the input of numbers, and obase is the output of the number of the system. Well remember, I am input,o is output.Note that the F
The filter condition for the scan command in the Hbase Shell Prefixfilter is to filter the Rowkey.
The difference between scan and get is that get gets the data from a row, and scan gets the data from several row, so you can set the filter
File command to view the properties of *.sh ASCII text with the CRLF line terminators
The line end flags for Linux and Windows text files are different. In Linux, the text file uses "/n" for carriage return, while Windows uses "/r/n" to indicate
In shell scripts, the variables are global by default. So recursive calls require the local keyword to be used to display identity locals so that recursive calls to functions can be implemented. Wrote a recursive calculation of factorial script,
HBase provides users with a very convenient way to use it, which we call "HBase Shell."The HBase shell provides most hbase commands, which can be easily created, deleted, and modified by HBase shell users, as well as adding data to tables, listing
1. Definition of variables
1.1 Variable names can consist of letters, numbers, underscores, but numbers cannot be the first character of a variable name.
1.2 Define the value of the variable by assigning the symbol "=", e.g:
Myname= ' Test ', String
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
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