Jenkins calls the shell to perform database upgrades and backups

# # #this is deploysql.sh####!/bin/bashLang= "en_US. UTF-8 "Date= ' date + '%y%m%d_%h%m%s 'User=rootPassword=yourpasswordcd/root/sqltest/SVN upIf [$? = 0];thenget_env= ' cat/root/sqltest/upgrade.sql |grep ^ #ENV =|sed ' s/#ENV =//g;s/.$//'Get_host= '

Ubuntu under ADB shell installation

01) Installationsudo add-apt-repository ppa:nilarimogard/webupd8sudo apt-get updatesudo apt-get install android-tools-adb02) Environment variablesI. Introduction of TOOLSAndroid-sdk-linux_x86/tools has a bunch of tools to use today: Android Debug

Conditional testing and looping statements in the shell

condition Test1. Condition testing: Test [The command test or [can test if a condition is true, if the test result is real, the exit status of the command is 0, if the test result is false,The exit status of the command is 1 (note the exact opposite

How to let awk use Shell variables under Linux

How to let awk use Shell variables under LinuxWhen we write shell scripts, we typically include other small programs or commands in the script, such as awk operations. For awk , we need to find some way to pass some values from the shell to the

Shell Scripting Learning Summary--mathematical calculation

Let, (()) and [] perform basic operations in bash, and advanced operations will use expr and BCLet# Let Result=x+ySelf-adding operation# Let X + +Self-decrement operation# Let x--Shorthand form# Let X+=6---Let x=x+6#let x-=6--Let x=x-6[]# y=$[2 + 1]#

Shell learns the next day

Condition testThe command test or [can test whether a condition is true, if the test result is real, the exit status of the command is 0, if the test result is false, the exit status of the command is 1 (note the exact opposite of the logical

Shell's sed grep little memory

SED commandUseProvides the flow editor.Grammarsed [-n] Script [File ...]sed [-n] [-e Script] ... [-F ScriptFile] ... [File ...]DescribeThe SED command modifies the row from the specified File parameter according to the edit script and writes the

A preliminary analysis of shell scripts

Simple comprehension: Use many tools to simplify complex steps in a shell scriptFrame: Must have notes, written by others can understandBeginning: #! The/bin/bash means that the file is using bash syntaxTo use this method to run a shell script, if

Shell redirection and file descriptors

ExplainRedirect: Is an action, an Operation action actionFile descriptors: Nouns, another representation of a file, Linux everything is file."Base redirection form" Input redirect Usage Rating: * *

Shell Programming Details (iii)

String test:= =: Test for equality, equality is true, not equal to False! =: Tests are not equal, unequal to true, equal to False>-N String: Tests whether the specified string is empty, empty is true, not empty is false-S string: Tests whether the

Shell script one-click Installation LNMP Environment

https://sourceforge.net/projects/opensourcefile/files/Nginx is a high-performance HTTP and reverse proxy server. Nginx in reverse proxy, rewrite rules, stability, static file processing, memory consumption and other aspects of the performance of a

The same way of thinking differently shell script way

Shell: ##################################### echo "Time is" date=$ (DATE +%y%m%d) echo $DATE echo "creat a fileder named by Time "Mkdir-p $DATEread-P" input number: "num if [$num-eq] then mv $DATE" Pass "fi#include   #include #include   #include   #

Shell gets the time range for the last one months, week

#!/bin/bashdate_today= ' date-d ' 1 day ago ' +%y%m%d ' #最近7天date_befor_7day = ' date-d ' 7 day ago ' +%y%m%d ' #上一个完整周 (Monday to Sunday) OFD ay= "' Date" +%u "'" "stepofday=" ' Expr $OFDAY + 6 ' "date_befor_weekday=" ' date-d '-' $STEPOFDAY ' Day '

Shell gets the return value of the function

Background: defines a function that is different than the number of local and online server clusters, and wants to get the number of distinct clusters. The function return value of the shell and other languages is quite different.  Define a

Shell-View Weather

/bin binary Executable command/sbin System Management commands, which are stored in the hypervisor used by the system administrator/usr/bin a multitude of applications/usr/sbin Some management programs for super users$city = $argv [1];$list = ['

Linux Learning notes basic bash shell commands

The/etc/passwd file contains a list of all system user accounts and basic configuration information for each userUser name: Password: uid:gid: User's full name: User's default working directory: User Default shell programBy default, the bash shell

The role of various parentheses in the shell

One, parenthesis, round brackets () 1, single parenthesis () ① command group. The commands in parentheses will be executed in a new sub-shell sequence, so the variables in parentheses cannot be used by the rest of the script.  Multiple commands in

Linux under Dialog+shell Three-layer Directory Professional specification springboard machine script

#Dialog +shell IntroductionDialog+shell combined use, square can reflect the effect of Dialog graphics, in the operation of the time, the use of graphical interface, you can give you a more intuitive feeling, I believe you will like his 650)

The grep tool under the shell

One. grepgrep (Globally search a Regular Expression and Print) is a powerful text search tool , it can use regular expressions to search for text, print matching rows, but does not affect the contents of the original file , and by the return value

Shell--2.shell Array

Shell Array(1) Defining an arrayIn the shell, the array is represented by parentheses, and the array elements are separated by spaces, defining the general form of the arrayArrt_name=(val1 val2 val3) or arry_name=(VAL1VAR2VAL3VAL4) or

Total Pages: 541 1 .... 321 322 323 324 325 .... 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.