Shell scripting Learning and summarizing _linux shell

1.shell scripts are small-case2.Unix special characters are: (; $ & * () [] ' "+ Use it to escape ()3.Shell comments begin with #4. Definition of functionFunction Fuction_name () {Command to execute}Use Function_name directly when calling.5. Control

Special characters in shell scripts (dollar, backslash, quotes, etc.) Introduction _linux shell

Special characters in the Shell have 1, $ dollar character2, reverse Slash3, ' inverted quotation mark4, "double quotes5, ;,*,?, [,] Let me make a list of the following One, $ symbol 1, echo $? The previous instruction exit status is displayed2,

The meaning and difference of the shell 1>&2 2>&1 &>filename redirect _linux Shell

In the shell, see ">&1" and ">&2" always do not understand what meaning. After the search on the internet to dispel doubts. Actually, this is two kinds of output. In a shell program, the most commonly used FD (file descriptor) is about three,

BASH shell test condition tests [[]] and [] similarities and differences summary

The test command is very powerful, but it is difficult to satisfy its escape requirements and the difference between string and arithmetic comparisons. Greater than Less than Equals Not equal to If ["$a"-gt "$b"]

Unix shell_oracle ERP and other systems interface data transfer via Shell control (case) (schema)

2014-06-26 BaoxinjianI. Summary When different system data are exchanged, there can be many ways, such as Mq,dblinkWhen it comes to some projects with more secure information, many companies use Unix shells to throw files directly.When using a

Two translation tools under the command line: SDCV & Translate-shell

Now open the browser has a variety of relevant plug-ins available, take word translation, etc. at your fingertips, but in the command line to browse the information encountered when the new words copied to the online search, one back more annoying,

Logical judgment in the shell, if judgment file, directory attribute, some special usage of if judgment

Logical judgment in the shell Format 1:if condition; Then statement; FI//If the condition is met, then execute the statement[[email protected] shell]# cat if1.sh #!/bin/basha=5if [ $a -gt 3 ]then echo okfi[[email protected] shell]# sh -x if1.sh +

Shell programming, 100 money to buy 100 chickens, simple implementation

There is an interesting question today:A group of friends wrote with a shell:#!/bin/bash# hundred million chicken, each chicken at least buy one all= -# Cocks per how many yuan read-P'Rooster How many text one:'gongji# hen per how many yuan

What is the built-in command of the bash shell

1. What is the build in command:The shell built-in command refers to commands in the bash (or other versions) toolset. There is usually a system command with the same name, such as the echo command in bash and the/bin/echo are two different commands,

Shell printf Command: Format output statement

The printf command is used to format the output and is an enhanced version of the echo command. It is a finite variant of the C-language printf () library function, and is somewhat different in syntax.Note: printf is defined by the POSIX standard,

Detection of network connectivity using shell script function

Typically, there are two ways to detect network connectivity for Linux systems:1. Through "ping command + Destination IP" or "Ping + target IP domain"Note IP network detection for IPV6 address need to try ping6, while ping6 can not use parameter

A concise summary of the special symbols and meanings in the Linux shell (most of them are included)

The case statement is suitable for applications that require multiple branching. The case Branch statement is formatted as follows: Case $ variable name inMode 1)Command sequence 1;;Mode 2)Command Sequence 2       ;;*)Sequence of commands executed

The method of intercepting string in shell and basic usage of cut

One or eight basic character interception methods:1. Use the # operator. Removes the first occurrence of the substr left character (including substr) from the left side, preserving the right character.Usage is #*substrFor example:650) this.width=650;

Linux Shell Programming Example-get process ID

Today, I learned a little bit about the shell programming under Linux and simply recorded the test cases.1. Edit the shell script file as follows:#!/bin/bashecho "Hello Bash Linux"echo "No. 0 parameter: $ A"echo "First parameter: $ $"echo "Current

Advanced Bash-shell Guide (Version 10) study notes two

Variable substitution$variable is a shorthand for ${variable}hello= "A B C D"Echo $hello # A B C Decho "$hello" # A B C DThe quotation mark preserves the whitespace inside the variable1 echo "$uninitialized" # (blank line)2 Let "uninitialized + = 5"

Chapter 4 sed commands and awk programming for Shell Learning

Sed command Sed only edits the copy of the original file in the buffer and does not change the source file. Therefore, to save the file, you must redirect it to another file. Sed: 1. Sed [Option] 'sed command 'input file 2. Sed [Option]-F sed script

Install zabbix-agent using shell scripts

[[Email protected] shell] # Cat zabbix. Sh #! /Bin/bash Set-x Host = 'hostname' Dir =/root Service iptables stop AZ () { Groupadd zabbix Useradd zabbix-G zabbix-S/sbin/nologin Tar-zxvf $ DIR/zabbix-1.8.5.tar.gz CD zabbix-1.8.5 ./Configure -- prefix

Pass Linux/Unix shell parameters to SQL scripts

In the database O & M process, shell scripts provide great convenience for O & M. The passing of shell script parameters as variables to SQL and SQL scripts is also a common situation for DBAs. This article mainly discusses how to pass parameters of

Simple array usage and examples in shell programming

Origin: in the shell programming teaching conducted by old boys in Linux training, many well-experienced netizens and students are still confused about arrays. The following is a small example of array usage, hope to help you. In fact, the shell

Shell basics 8: text filtering tool (grep)

From: http://bbs.chinaunix.net/viewthread.php? Tid = 446683 Quote: The original post is published by "net player: For example, in Linux, you can find grep, egrep, and fgrep programs. The differences are roughly as follows: * Grep:In traditional

Total Pages: 541 1 .... 40 41 42 43 44 .... 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.