Shell Programming Notes (four) __ programming

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"

How to invoke a shell script file in Java

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

Java Implementation sort (insert sort + bubble sort + Select Sort + Shell sort + quick Sort) __java

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

Arrays and traversal __linux in the Linux shell

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,

Linux execution Shell script hint file cannot find problem resolution __linux

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

Background operation under Linux Shell and its foreground conversion __linux

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

Multiple shell commands are executed in Java, except for the first one that has not been executed __java

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 =

Use Shell in Linux for various operations of the database __ large data

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

Shell get file suffix

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

Jenkins execute the shell command for the remote Linux system __linux

ssh

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

How to implement Shell concurrency

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,

Summary of Shell transformation

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

Filter conditions for the Scan command in the Hbase shell Prefixfilter

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

Problems with garbled shell script editing

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

Recursion in a shell script

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,

Shell nested conditional statement, as far as possible close to two times to judge

if [$#! = 2] Then if [$ = "H"-O $ = "H"] Then echo "Help Info" Else echo "Error:invalid argument amount! Plz Input 2 directory names! " Fi echo "**************************************************************" echo "* by Richard Zhang, Oct, 2008.

Hbase Shell Details

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

Shell Scripting Learning Notes-variable usage and input and output

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

Shell Script Programming Basics

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

Shell calculation script

#!/bin/bashPrint_usage () {printf "Please enter an inteper \ n"}Read-p "Please input first number:" FirstnumWhile ["echo "$firstnum" | sed -r ‘s#[^0-9]##g‘"! =" $firstnum "]DoPrint_usageRead FirstnumDoneRead-p "Please input the operators:"

Total Pages: 541 1 .... 276 277 278 279 280 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.