Select Connection Query Brief:Union Union Query Second, about the internal connection Union Union Query
Function: Merge 2 or more query results together
Details: (table 1 Query results) Union (table 2 query results)
Execution: The results of
$#, the number of arguments followed by the script runtime#! /bin/bashCase ' $# ' in 0) printf "Enter A number: " Read n= $REPLY ;; *) n=$1 ;;EsacX=$ (((1 + $n) * $n/2))echo "Tne value of 1 + 2 + 3....+ $n = $x"The
sudo uname--m View the number of operating system bitssudo uname--s display kernel name ssudo uname--r display kernel versionsudo uname--n display the network host namesudo uname--p display CPUUnder Ubuntu, text files are usually opened with the
By using the Read command, you can output or perform operations after entering content from the terminal1 #!/bin/bash2#Author: Blacksonny3#Copyright (c)4 #Script follows here: 5 6 Echo " How is old is you ? " 7 Read Age 8 Echo " " $ageThe above
The shell is a program written in C language.Several common Shell:bash, SH, csh, ksh, etc.Bash is the default standard shell for Linux and is fully compatible with SHSH is the default standard shell for UNIXAsh is the smallest resource-intensive
#/secondin/secondfirstshecho "Please enter the Numseconder"Read FirstRead Secondif test $first-eq $secondThen echo "The No.2″"Elif Test $first-GT $second//Determine if it is greater thanThen echo "The No.2″ >else echo "No.2″ FiExample 2. Find out if
ReferenceCase , If I want to output an asterisk (*), How do i use echo ?echo *This is certainly not possible , need to transfer the * , that is : Echo \*This leads to the concept of references . referenced by , is used to prevent Shell to interpret
#!/bin/bash#斐波那契数列#不要用递归, the depth is more than 30 old fire. functionfun_test(){if[ $ -lt 3]; Then Echo 1 return fisum1=1Sum2=1 LetCount= $-2sum=0 while[$count -GT 0]; Do Letcount-- LetSum=sum1+sum2 LetSum1=sum2 LetSum2=sum
Method One: Add debugging options when you run the script:"Usage" bash– option./shellscript.sh-e: If a command returns a non-0 exit status value (failed), exit.-N: You do not need to execute the script just to check the syntax structure and return
When it comes to learning about Linux and OpenStack, it's important to learn scripts well, whether it's a large-scale deployment or operation, and shell scripts are already standard.Here are just some basic notes for the Linux shell, which are noted
CTRL key related shortcut keys:Ctrl + A-jump to the start of the lineCtrl + B-move back a charCtrl + c-terminate the command//use the most?Ctrl + D-delete from under the cursorCtrl + E-jump to the end of the lineCtrl + f-move forward a charCtrl +
1) Judgment expressionIfTest (expression is true)IfTest! expression is FalseTest expression 1–a expression 22 expressions are trueTest expression 1–o Expression 22 expressions have a true2) Judging the stringTest–n string string is not zero in
This document is referenced from http://www.cnblogs.com/zhuyp1015/archive/2012/07/11/2586985.htmlAWK: useful Data processing toolsAwk is also a great data-processing tool! SED is often used for the processing of an entire row, and awk prefers to
#!/bin/bash### #定义screen的名字, the following installation will use screen this command screen_name= "LANMP" #根据 $UID to determine whether the user is root, must root to perform if [ $UID != 0 ]; then echo "You must be root to
Spark version 1.3.1Scala version 2.11.6Reference official website http://spark.apache.org/docs/latest/mllib-clustering.htmlAfter running Spark-shell, first import the required modulesImport Org.apache.spark.mllib.clustering.KMeansImport
Shell Script Programming
#! /Bin/bash # Fibonacci sequence # Do not use recursion. If the depth is greater than 30, it will get old. Function fun_test () {if [$1-lt 3]; then echo 1 return fi sum1 = 1 sum2 = 1 let count = $1-2 sum = 0 while [$ count-
Solution for shell not displaying the user name path in CentOS
In CentOS, shell-bash-4.1 $ solution to not display the user name path
Problem description:
Add a new user under CentOS. After logging in, the shell script information is as follows:
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.