what in shell

Alibabacloud.com offers a wide variety of articles about what in shell, easily find your what in shell information here online.

8 Methods of string interception in shell scripts-go from the home of the script

Transferred from: http://www.jb51.net/article/56563.htmString interception of Linux is useful. There are eight ways.Suppose there is a variable var=http://www.aaa.com/123.htm.1. # Intercept, delete the left character, leave the right character.Echo $

Special symbols in shell scripts

The special symbols commonly used in the shell are listed as follows: #;;; . ,/\ \ ' String ' |! $ ${} $? $$ $*\ "string\" * * *? : ^ $# [email protected] ' command ' {} [] [[]] () (()) | | && {Xx,yy,zz,...} ~ ~+ ~-& \\ +-%= = =!=# well (comments)

Application of select in shell scripts

Select is also a kind of loop, it is more suitable for use in the case of user choice.For example, we have one such requirement, after running the script, let the user go to select the number and then execute the command!#!/bin/bashselect Mysql_v in

Summary of 8 methods of string interception in shell scripts

String interception of Linux is useful. There are eight ways.Suppose there is a variable var=http://www.aaa.com/123.htm.1. # Intercept, delete the left character, leave the right character.The code looks like this: Echo ${var#*//}where Var is the

Comparison of integer values in shell scripts

-eq: Equals-ne: Not equal to-GT: Greater Than-LT: Less than-le: Less than or equal to-ge: greater than or equal toCat File.txt | awk ' $ >= ' 09:03:00 "'How awk takes the reverseCat File.txt | awk ' $ >= ' 09:03 ' | awk ' {$2= ' ";p rint} 'Not the

Mathematical operations in shell scripts

assignments and operations in the shell are string-handling by default, and here are a few special ways to do mathematical operations in the shell. In the future when you can see, hehe1. Examples of error methodsAVar=1+1Echo $varThe result of the

Linux in shell variable $#,$@,$0,$1,$2 meaning explanation:

Variable Description:$$ Shell自己PID(ProcessID) $! Shell背景上次执行Process的PID $? 命令的结束代码(返回值) $- 使用Set命令设定的Flag一览 $* 全部參数列表。如"$*"用「"」括起来的情况、以"$1 $2 … $n"的形式输出全部參数。 [email protected] 全部參数列表。如"[email protected]"

function return value in shell

1. PrefaceAlmost half a year did not write a blog, wasted a long time, work in the chores too much, their own more and more lazy. In order to spur their own growth, or to insist on writing a blog, record their growth.2. Shell Function

Test switches and special parameters in shell scripts

1. Test SwitchSome test instructions are included in the shell, and the following table lists the meanings of these test instructions and whether they are available for the test command, bash, Ksh. Switch Test Bash Ksh

Mathematical operations in shell scripts

the assignment and operation in the shell is the string processing by default, here are some special methods of mathematical operation in the shell, which can be seen later, hehe1. Examples of error methodsAVar=1+1Echo $varThe result of the output

Special usage of $0,$?,$! in shell

$$The PID of the shell itself (ProcessID)$!PID of the Shell's last running background process$?End code of the last Run command (return value)$-Flag at a glance using the SET command$*All parameter lists. such as "$*" in the Case of "" ", in the

Linux in Shell read and write operations MySQL tutorial and advantages and disadvantages of "recommended"

1. Connect MySQL database The way to connect to a database in a shell is simply to specify a username, password, the name of the database to connect to, and then redirect to enter the MySQL statement as follows: Mysql-u username-p PASSWORD

Use function (function) examples in shell scripts _linux shell

function can make a similar custom execution command in shell script, the biggest function is to be able to simplify many of our program code. It is important to note that the shell script is executed from top to bottom/left to right, so the

Trap capture signal in Shell in Linux

A signal is a interprocess communication mechanism that provides an application with an asynchronous software interrupt that gives the application the opportunity to accept commands (i.e., signals) sent by other programs live terminals. After the

Execute MySQL statement in shell script

For automated operations, such as backup recovery, DBAs often need to encapsulate SQL statements into shell scripts. This paper describes several methods of SQL statements for shell scripts in MySQL database under Linux environment, for your

Execute MySQL statement in shell script

After the table is built by hash, the data volume of the table is 2048 large, how to verify the table is successful?Logical generate table name this part will not be written. As long as you can build the table successfully, this part of the script

Using Sqlplus in shell and debugging related

Five, for security requirements each execution of the shell manually entered the password$ VI test5.sh#!/bin/bashEcho-n "Enter password for u_test:"Read PASSWDSqlplus-s/nolog Conn u_test/$PASSWDSELECT * from tab;ExitEof$ chmod +x

Test operation symbols in shell scripts and && | |

测试操作符 Common Test Operators English name Description -F file file files exist and are normal files True, that is, test expressions are set -d file Direct Ory

The use of if,case,for in shell scripts

DirectoryI. Condition selection: If statementTwo. Conditional judgment: Case statementThree. For loopI. Condition selection: If statement Single Branchif judgment condition; thenBranch code with true conditionFiExample: Judging whether a number

If, case, for, while, until in shell scripts

If condition test statement If-then-fiThe IF condition test statement runs the command after the if (judgment).If the exit status code for this command is 0, the command in the then section will be executed.If the exit status code for the

Total Pages: 15 1 .... 10 11 12 13 14 15 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.