Shell Script Programming Learning notes (iv) Shell operations database

First, the basic operation of the database1) Log in to MySQL server: mysql-u root-p password2) View database: Show databases3) View table: Show Tales from DB;4) View table structure: DESC table;5) Creating Table: Create table table ();6) View Table

Shell Automation Installation Lamp

(a) Installation ideas(1) Source code compile Apache WEB Service(2) Source code compile MySQL DB service(3) Source code compiled PHP WEB service(4) Lamp Source Integration +php page creation(5) Optimization of shell scripts, introduction of

Shell (i)

1. The idea before writing a scriptConsiderUnified Script ManagementPermissions: User execution permissionsEmpty the error fileError hintsScripting Versatility2.2 Unified Script Directory1 mkdir /server/scripts2 cd/server/scripts2.3 Creating a

Function of Shell programming

First, function definition and invocationA function is a series of commands that are customized in a shell script, and generally the function should have a return value (returning 0 correctly and returning a non-0 error). For error returns, you can

Linux command----Shell

Shell: The command interpreter executes the corresponding command according to the command entered.See which shells are under the current system:Cat/etc/shellsView the shell that is currently in use by the systemEcho $SHELLCommon shell/bin/sh "has

Linux5.4 Shell special symbols and piping related commands

Special Compliance 1. * Any of the characters 2. ? Any one character 3. # comment Character 4. \ de-semantic character 5. | Pipe character 6. The $ variable prefix, which represents the row bit 7. ; Multi-line command line input, split with

How the date loops in the shell

First Kind# 这里的例子以周为循环!/bin/bashbegin_date="20160907"end_date="20170226"while [ "$begin_date" -le "$end_date" ];do year=${begin_date:0:4} week_of_year=$(date -d "$begin_date" +%W) echo $year, $week_of_year begin_date=$(date -d

Use the SED command in the shell to replace/\/

SED command Related:Https://www.cnblogs.com/ggjucheng/archive/2013/01/13/2856901.htmlHttps://www.cnblogs.com/DragonFire/p/6600121.htmlHere we have to do the function is:Enter a directory "/data/data8"Transform it to "\/data\/data8" in the shell

Shell-based pipe characters and variables

Pipe characters and variablesOne, the pipe character and the job command1.txt |wc–l; Cat 1.txt|greap ' AAA 'The command for the pipe character is to give the result of the previous output to the following command2.ctrl z pause a task3.jobs viewing

Shell loops and traversal

Enter parameter traversal########## [email protected] indicates a parameter string#!/bin/bashecho [email protected]For i in [email protected]; DoEcho $iDoneSelf-incrementAs far as I know, in bash, there are currently five ways to do this:1. i= '

Shell file permissions and script execution

I. Rights Management1. View file propertiesLs-l2. Permission TypeIi. Linux Users and permissions1. User Management① Viewing usersID User1② adding usersUseradd user1③ Deleting a userUserdel-r user11. User Group① New GroupGroupadd G1② Deleting a

Shell automatic backup Deployment New Project (2)

Optimized scripts for automatic backup, automatic restart of Tomcat#!/bin/bashnew_war= "Mobile.war" project_name= "tomcat-app1" #创建临时文件夹tempDirName = ' date ' +%y%m%d%h%m%s ' tempdirname= "Bak/mobile-${tempdirname}" echo "Ready to create Temp folder:

Shell Programming (i)

Today, programmers who don't have Linux do not mean that they are programmers, and not shell programming can say that they are Linux. It sounds like shell programming is a dick, but don't worry, shell programming is really simple.Background

Shell Introduction, Command history, command completion and aliases, wildcard characters, input and output redirection

Shell IntroductionThe shell is a command interpreter that provides interaction between the user and the machine, supports specific grammars, such as logical judgments, loops, and each user can have their own specific shellCentOS7 default shell is

Shell Scripting 1

determine whether a variable is an integer through expr[email protected] scripts]# cat judge.sh#!/bin/bash############################################################### File Name:judge.sh# version:v1.0# Author:rain Jin# Blog site:http://www.cnblogs.

Control judgment statements in shell programming

If Single-format and nested if conditional expression; then #当条件为真时执行以下语句 command list else #为假时执行以下语句 command List fiif Statements can also be nested using an if condition expression 1;then if condition expression

Qualified Linux OPS personnel must be 30 shell programming surface questions and explanations-09

Enterprise Actual Combat Problem 9: How to implement the MySQL database sub-Library plus table backup, please use the script to implementMy script

Shell Scan IP Segment

#!/bin/shdomain= ' echo $1|awk-f '. " ' {print $ '. $ "." $ "."} ' ' Start_ip= ' echo $1|awk-f "." ' {print $4} ' end_ip= ' echo $2|awk-f '. " ' {print $4} ' echo ' domain is $domain ' function Scan () { ping-c 1 $1$2 >/dev/null && echo "$ is

Shell (awk) array use case

1. Take the IP address of the ifconfig eth0[Email protected] ~]$ ifconfig eth0Eth0 Link encap:ethernet HWaddr 00:0c:29:68:47:71inet addr:192.168.48.144 bcast:192.168.48.255 mask:255.255.255.0Inet6 ADDR:FE80::20C:29FF:FE68:4771/64 Scope:linkUp

Windows automatically uploads and executes Linux-specified shell files

Install Putty.exe, the following EXE files are installed in the installation directoryCreate File Put-file-mobile.txtRM Mobile.warput D:\SVN_LZY\dragon-tour-2_1\lzy-mobile\target\mobile.warexitCreate a batch file release-mobile.batPsftp.exe [email

Total Pages: 541 1 .... 342 343 344 345 346 .... 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.