Avoid escaping in the Shell script SQL statement * output

The script test.sh content is as follows, execute the script under/home/myname/,Home directory with file a.txt,test.log,test.sh#!/bin/bashSql= "SELECT * from EMP;"Echo $sqlecho $sql > Test.logResults after execution:Select test.sh a.txt test.log

Bash Shell First lesson

Self-taught shell, and was taught by the teacher, English class do not study English four how to live, haha, that there is no data on my attractiveness, ah, for love and dream!!!Recall the file format: filename with an. sh extensionFile content at

Shell Script debugging

Bash is the default scripting language in a Linux system, and since it is a programming language, debugging of scripts is essential. Here's a simple debugging approach to bash:1 using Bash's parameter-X, such asBash-x a.sh+ for A in ' bafa{1..4} '+

Shell instance (i)

Shell instance (i) Example one: equals-eq (equal)Unequal-ne (not equal)Greater than-GT (greater than)Smaller than-lt (less than)Greater than or equal to-ge (greater than or equal)Less than or equal to-le (lesser than or equal)Examples

HBase Learning Notes-hbase Shell common commands

Limit the number of rows when you sweep a table' table_name ' 5 }When the table is scanned, only five data is specified==============================================Delete TableThe deletion of the table requires the implementation of two steps,

Shell ———— Regular expression Basics and sed

What is a regular  A regular is a way to describe a character or string by combining symbols with special meanings, called regular expressions. Or, the regular is the rule used to describe a class of things.In Linux, wildcard characters are

Loop of shell scripts: repeating commands

Loop of shell scripts: repeating commands1.for CycleGrammar:For variable name in variable Value listDoCommandDoneFor based on the contents of the variable Value list, executes the command repeatedly until all the contents of the Variable Value

Shell Learning Essays

Umask Set permission mask General default mask is 022 Directory highest permissions 777 File maximum permissions 666 Based on mask, permissions are 777-022 = 755 666-022 = 644   String test /p>  test   1

Shell Basics (ii) Cut usage

Shell Basics (ii) Cut usageSyntax: cut-d ' delimited character ' [-CF] n-D after specifying delimiters , single quotation marks, must be a single character-f Specifies the paragraph, which can be separated by commas with multiple numbers-C is

Shell some methods

String interception from the original address: http://www.jb51.net/article/56563.htmOne: string interceptionThere are VAR variables:var=http://www.aaa.com/123.htm1. # Intercept, delete the left character, leave the right character.echo ${var#*//}Www.

Get the time of the previous day and the use of the Shell's ${!3} and eval

Example 1:[email protected] opt]# cat a.sh #!/bin/bashsource/opt/b.txtaa=${!1}echo $AA [[email protected] opt]# cat B.txt Abc=1[[em AIL protected] opt]# sh a.sh ABC1Example 2:[email protected] opt]# cat a.sh #!/bin/basha=1b=aecho ${b}echo ${!b}eval

Shell Learning Summary (I.)

#! /bin/bash#The head can not be less, called the magic number, tell the computer is a shell script, with bash to execute it, otherwise unrecognized.Shell script file to end with. SH, not necessary, just good identification, specification.1.if

Shell sort based on insert Sort

Reason:when It comes to insert sort,the snail Appears,as It just moves forward step by step or even worse. So we need some improvement.the first idea May is, we can walk forward in big strides. Shell sort do the same thing.The basic realization

Simple Shell Programming

Simple shell programming by Dreamboy1#!/bin/Bash2 while true3 Do4 Echo5 Clear6 Echo7Echo"System Maintenance Menu"8Echo"============================ "9Echo"1) Display the system date"TenEcho"2) Modify the system date" OneEcho"3) Show logged in user"

A few questions about shell scripts

1: Give two files a record password, a record user, how to create a new user with Shell script?650) this.width=650; "Src=" https://s3.51cto.com/wyfs02/M02/8E/65/wKioL1i_jr6RehB6AADkqMMaJhE915.png-wh_500x0-wm_ 3-wmp_4-s_328620466.png "style="

Shell Script Execution

Method One: Switch to the directory where the shell script executes the shell script:cd/data/Shell. /hello.shThe./means to execute hello.sh under the current working directory. If you do not add./,bash may respond to an error message that could not

Shell in parentheses summary: {}, (), (()), [], [[]]

Parentheses Summary() Single parenthesis Command group, the command in parentheses will open a new child shell execution Variables in parentheses cannot be used by left script Semicolon separated between commands

Linux main shell command detailed (bottom)

command-line editing operationsFunctionCtrl+b or LEFT ARROW keyMove one character to the left (move to the previous character)Ctrl+f or RIGHT ARROW keyMove one character to the right (move to the next character)CTRL + AMove to the beginning of the

Hill sort Shell Sort

Hill sort Shell Sort is an improvement based on the insertion sort, which is also divided into two parts,The first part, Hill sort IntroductionThe second part, how to choose the keyword, the key is to choose the key of hill sortFirst piece of hill

Arrays in the shell

How to compile Bash execution(1) Bash test.sh(2) chmod 755 test.sh #给bash赋予可执行的权限 r-4 w-2 x-1./test.shBash supports one-dimensional arrays (which do not support multidimensional arrays) and does not limit the size of arrays. Similar to the C

Total Pages: 541 1 .... 525 526 527 528 529 .... 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.