[Shell base]--variable

Assigning values to variables#定义变量, note that there is no space on either side of the equal sign variable=#定义环境变量Export variable=#双引号: Can contain spaces, can escape special characters variable="" #$ () or anti-quote: assigns a command

2nd Chapter into the shell

several termsMute terminal (dumb terminal):A dumb terminal was usually nothing more thanA monitor and keyboard connected to the Unix system via a communication cable (usually a multiwireSerial cable multi-line serial cable, also called ribbon cable).

Shell if judgment

#!/bin/sh/ETC/INIT.D/SNMPD start && >/dev/nullPid= '/ETC/INIT.D/SNMPD status| grep pid ' # '/etc/init.d/mysqld status| grep "not running" to see if the status of the service is healthy with the status stateIf ["$pid" = = ""]; Then

Linux Shell Process Control

Guide Unlike the Java, PHP, and other languages, the Linux shell has its own process control statements, including conditional statements (IF), loop statements (for,while), and SELECT statements (case). I'll use the example below to illustrate

3 ways to redirect Shell files

Three ways:1.While Read lineDoDone2.For line in ' cat filename 'DoDone3.Cat FileName | While Read lineDoDoneCases:Reads data from the Math_file file, outputs the maximum, minimum, and average values1.650) this.width=650; "src="

Linux Gvim Shell for Loop

#for循环#格式#for variable in list#do# Command1# Command2#    ...#doneA sequence of #列表是一组值 (numbers, strings, etc.), each separated by a space. Once per loop, assign the next value of the list to the variable#in list is optional, if it is not used, the

Linux Gvim Shell String

#字符串: As the number is the most commonly used type, the other is nothing to use.#字符串可以使用单引号, double quotes, without quotes.#单引号字符串限制:# 1. Any character is output as is, and the variable in single quotation marks is invalid# 2. Single quotes cannot

The test command usage of the Linux shell is detailed

Basic format:Test expressionExpression constructed for the test command.Here expression is any valid expression that the test command can understand, and the simplified format will be the most common format that the reader may aiiowed seereturn

Shell Scripting Learning

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/82/94/wKiom1dbsIGDuCnRAAH8FIk-588267.png "title=" QQ picture 20160611143136.png "style=" Float:none; "alt=" Wkiom1dbsigducnraah8fik-588267.png "/>Shell script: Data batch processing, Task

Linux Gvim shell input and output redirection

#输入输出重定向: Unix gets input from stdin by default, stdout output, input device is keyboard, output device is terminal#输出重定向: The clear output can be not only the monitor, but also the transfer to the file, which is called the output

Use of the EXEC command in the shell

As a result of the recent scripting, with exec, haha, today simply record a bit to deepen the impressionEXEC Execution ProgramAlthoughexecand theSourceis executed directly in the parent process, butexecthis andSourceThere's a big difference,Sourceis

Single and double quotation marks in the shell

Use directly after declaring variables in the shell:#! /bin/bashNa=zhagnsanag=11Echo ' $na is $ag years old 'Output: $na is $ag years oldecho "$na is $ag years-old"Output: Zhagnsan is one years oldTherefore, use "" in shell scripts to output

Linux Gvim Shell Operators

Shell operators: Arithmetic, Relationship, Boolean, string, file testNative bash does not support simple math operations and can be implemented with awk expr, which is most commonly used in expr.Expr is an expression evaluation tool that uses it to

Conditional judgment in Linux Shell corner

1. Condition Judgment:If use:if condition; Then commands; fiIf else uses:if condition; Then commands; Else if Then commands; Else commands; fiDescription&&| | action; # If condition is false, the action is executed. && is the logic and operator, |

Linux Learning Notes (ii)-shell tutorials

1. Shell Tutorial1. Shell TutorialThe shell is a program written in C and a bridge for users to use Linux. Linux is both a command language and a programming language. A shell is an application that provides an interface through which users access

Shell multithreaded Scripts

1) Multithreading Overview2) Multithreaded script content3) Multithreaded script execution time4) Single Thread script content5) Single Thread script execution time"Multithreading Overview"# multithreading refers to executing tasks concurrently

Llinux Gvim Shell Array

#数组: Bash supports only one-dimensional arrays, starting with subscript 0.#定义数组: Array_name= (value0 value1 value2), as follows1 array_name=(2value03value14value2 5 )#还可以单独定义数组的各个分量, a continuous subscript may not be used, and the subscript range

"Original" Java program calls remote shell script

The purpose of this program is to execute shell scripts on the remote machine."Environment Parameters"Remote machine ip:192.168.234.123User name: RootPassword: rootPath to shell script:/home/ifilegentool/bakprovisionandoccurentrance.sh"Concrete

Repairing method of Redhat broken shell bug

cve

Hackers exploit this vulnerability to execute arbitrary code, even without the need for authentication, to remotely gain control of the system, including executing malicious programs, or implanting Trojan horses within the system, or obtaining

First day on cnblogs, broken shell Date ~ ~

Suddenly want to find a place to write a little article, and think of this old account, not because of the long-term silence was deleted is very touched ... All right, let's just commemorate this. First day.I suddenly wanna write something and

Total Pages: 541 1 .... 370 371 372 373 374 .... 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.