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"
Today, the script on the company server to get its own notebook on the run error, set-x tracking discovery is a variable in the self-increase operation error occurred, the error section of the script is probably like this:
#! /bin/sh
param=0
Gathen: 397706991, learning together
Conf/hive.xml
Specific shell code Download: http://download.csdn.net/detail/luo849278597/9490920
create table if not exists think_statistics (date_type_name string,date_name string,type int,type_ Name
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
I'm going to look at the database in Eclipse and operate it through CMD. Directory path is:/data/data/com.abc.oa
It is more convenient to use the SqLite3 command directly in the ADB shell.
1. Open cmd
2. Direct input to adb shell
3. Enter
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
To get all file names in the directory (including subdirectories), the path and file size should be the easiest to use with the shellShell script: lsdir.sh
#!/bin/bash
function ergodic () {for
file in ' ls ' do
if [-D $ '/' $file]
then
When executing a jar package from a command line or shell script under Linux, if the jar package does not refer to an external jar package, it is very easy to do so simply by using the following command:
Java-jar Test.jar #注意, if you do not
Sometimes run a shell script error, generally can not find the shell file, mostly because the script is generated under Windows and then copy to Linux, with the following command check:
$ head-1 Yourscript | Od-c
And the IT ends:this is wrong
000000
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,
1. When defining a variable, no spaces can be left on either side of the = number.egGender=femal ———— RightGender =femal ——— –wronggender= femal ——— –wrong2. Conditional test statement [Both sides of the symbol must be left blank.egif [$gender =
Recently just learned the shell script programming method, uses the shell script to implement a colored progress bar, below will show the result to everybody.Program ResultsThis is really very simple to achieve, only need to understand some basic
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
One: Program concept? Program: Algorithm + data structure? data: Is the core of the programData structure: The type and organization of the information in the computer? algorithm: How data is processedProgram Programming Style:Program:
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
测试操作符
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
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.