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 script If statement, determine whether a program exists, does not exist to start the program!

Presumably everyone knows "if ... So ... " The application of this grammar!Of course, Linux for this kind of usage is also considered, many times we need to write a shell script, it is unavoidable to avoid the IF statement.For example: Determine if

Pipe and job control, shell variables, environment variable profiles

Pipe characterIt is used for the output of the previous instruction as input to the latter instruction.650) this.width=650; "src=" Https://s5.51cto.com/oss/201711/16/1d984a59004a96e2f826e971888f9636.png "title=" Clipboard.png "alt="

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= '

3 ways the shell reads files by line

the shell reads files by line There are many ways to do this, and here are three ways to write:Writing one:#!/bin/bash# Description: # while loop read Line operation # Author: Lone Boat Dot # version:1.0#创建时间: -one- Geneva:

What exactly is a shell in Linux

Meaning of the "one" shell: First, the Shell's English meaning is "shell"; It is relative to the kernel, because it is based on the kernel, a representation of the user, for example, we see a ball, see its shell, not nuclear. The shell in

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 Record-shell Script Basics (iii)

The basic control statement of the if...fi statement, which allows the shell to conditionally make a decision and execute the statement.GrammarIf[]thenStatement(s)ifistruefi Shell expression evaluation. If the result value is true, the given

Loop syntax in the shell

Loop syntax in the shellYun ZhengjieCopyright Notice: Original works, declined reprint! Otherwise, the legal liability will be investigated.A. For Loop1. Syntax format 11 for inch Value 1 value 2 value 3 ... 2 Do 3 Source Code 4 Done   2. Syntax

Talk about how the Shell learns.

Frozen pottery mu Fpniy advised surname Xin http://weibo.com/u/6195707793Cang Chen Rao y2b0i apricot Jia Unitary http://www.docin.com/app/user/userinfo?userid=180238445Rabar 579QH http://tushu.docin.com/srfm596The i5szn of white Eclipse and the http:

Shell finishing (29) = = = Determines whether the user input can be used as a variable

(a) Title:Accept a user input to determine if the input can be used as a variableConditions that can be used as variables(1) Uppercase and lowercase letters can be(2) A number may be in the middle of the letter, but cannot begin with a number(3)

CTF game Linux file monitoring and recovery shell

Before participating in the CTF competition when the temporary write, there are a lot of shortcomings, but can be used, put it out to share to everyone, hope to help everyone.Script one: Record the current directory situation#!/bin/bashfunction

Usage of SEQ in shell echo-n usage

Usage: seq [options] ... TailOr: seq [options] ... First Count MantissaOr: seq [options] ... First number increment MantissaTwo ways to cycle from 1 to 100 (bash other shells have not tried)For x in ' seq 1 ';d o echo $x;d oneFor x in {1..100};d o

Shell Start-Stop script

To list any process listening to the port 8080:lsof-i:8080To kill any process listening to the port 8080:Kill $ (Lsof-t-i:8080)or more violently:Kill-9 $

Shell scripting monitors memory and sends messages

1. Prepare the tool to send the message:#!/usr/bin/python#-*-Coding:utf-8-*-Import SysImport SmtplibImport Email.mime.multipartImport Email.mime.textServer = ' smtp.163.com 'Port = ' 25 ' def sendmail (server,port,user,pwd,msg): SMTP = Smtplib.

Shell's Process Control

One, if statement, while, for loop a variety of small examples1. User authentication[[email protected] ~]# cat buer.sh #!/bin/bash#user= ' buer ' #password = ' 1234.com ' read-p ' please your name: ' Userread-p ' pas Sword: ' passwdif [$user = '

Shell programming two--read, array,

First, the use of ReadFunction: Read input of keyboardUsage:  ①, simple shell read;    Note: If you do not add a variable after read, the default assignment is to reply[[email protected] opt]# Read (no add variable name after read, default

Shell Foundation--shell Special variables

A. Variable listTwo. ExperimentsSystem: CentOS 71. Special variables[Email protected] ~_~ day2]# cat p.sh#!/bin/bashEcho ' $: ' $Echo ' $*: ' $*Echo ' [email protected]: ' [email protected]Echo ' $#: ' $#Echo ' $1$2$3: ' $1$2$3[[email protected] ~_~

Yzmcms Backstage Get Shell

Not much nonsense to say, straight into the topic first function.php can see this method is written in the way array traversal to/config/config.php open config.php see Use return array () to define all configurations as an

The Windows platform is a shell environment that simulates Linux

In the Linux platform simulation of the Linux shell environment, can be implemented by a software: Cygwin (click to enter the official website to download), such as (select the corresponding version to download):    Installation:1. Double-click the

Total Pages: 541 1 .... 208 209 210 211 212 .... 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.