Linux Learning notes Chapter 8th Linux Shell Basics

Tagged with: Linux centos Shell wildcard8.1shell IntroductionThe shell is a command interpreter that provides human-computer interaction.Supports specific syntax.Each user can have their own specific shell (bash).CentOS7 default bash (Bourne Agin

2018.4.21 Five week fourth class (Shell special symbol, cut intercept and other commands)

Shell Special Symbol _cut command概念:cut命令用来截取某一个字段格式:cut -d ‘分割字符‘ [-cf] n,这里的n是数字,该命令选项有如下几个:- d 后面跟分割字符,分割字符要用单引号括起来- c 后面接的是第几个字符- f 后面接的是第几个区块The Cut command uses the following [Email protected] do]# cat/etc/passwd

Shell introduction, History, aliases, wildcards and redirects

Shell Introduction The shell is a command interpreter that provides interaction between the user and the machine Support for specific grammars, such as logical judgments, loops Each user can have their own specific shell CentOS7

Shell Introduction Command history command completion and alias input output redirection

Shell IntroductionThe shell is a command interpreter that provides interaction between the user and the machineFor example, we have remote login tool, it is actually a shellThe CentOS default shell is bash (Bourne Agin Shell)·Command historyHistory

Using shell script +expect to deploy SSH in bulk

Shell script +expect deploying SSH in bulkFirst, the preparation of work and ideas1, three machines to do experiments (centos6.5, ip:192.168.0.22 (master control), 192.168.0.156, 192.168.0.157)2,ip:22 this one control machine, the other 2 do the

Shell Programming (iv): variables

Variable Variables are abstract concepts that can store calculated results or can represent values. Variables can be accessed by variable names. Variable declarationDeclaring variables is generally used in the following

Shell Script Programming Learning notes-while loops

1. When type cycle and until type cycleWhile using a few, the general daemon program or always loop execution will be used, the other loop operations are used for instead.1.1 Type and until type loop syntax(1) While conditional

Shell script creates a virtual machine and configures the network card IP address (two scripts)

###################### #脚本1: Creating a virtual machine kvm##########################!/bin/bashQcow2_dir=/var/lib/libvirt/imagesRead-p "Please enter the virtual machine number:" Num #主机号If [$num-lt 9];thenNum=0$num # #主机号FiIf [-Z ' $num '];thenecho "

Shell script Common script: while

Whileconditional SentenceGrammar:Condition to meet always doneWhile conditionDoinstructionDone==========Conditional satisfaction exit (rare)Until conditionsDoinstructionDone  Script instance: Daemon monitoringSleep: Print per secondUsleep:

Shell condition judgment

1. string Judgments STR1 = str2 True when two strings have the same content, length Str1! = str2 True when strings str1 and str2 are unequal -N str1 True when the length of a string is

Shell Scripting Learning notes-integer Two-dimensional comparison operator

1.1 The following table is a common two-dimensional comparison operatorWe can also see through the man testTips(1) The ".(2) the ">" symbol is greater than the meaning, if[["$a" > "$b"]], if[["$a" \> "$b"]. You need to escape in parentheses because

Variable assignment for shell scripts

Parameter related knowledge${parameter:-word}: If parameter is empty or undefined, the variable is expanded to "word"; otherwise, the value of parameter is expanded; ${parameter:+word}: If parameter is empty or undefined, do nothing; otherwise,

Shell Programming------Script Example

md5

1. Batch Add UsersCreate a TXT file for the user name and password combination userdata.txt, as follows:123123 123 123 123 123The script to add the above users in bulk is:#! /bin/Bash whileRead Line Dousername=$(Echo$line |Cut-f1-d' ') #或 username=

Shell Scripting Basics App (ii)

In order to make the shell script have a certain "judgment" ability, according to different conditions to accomplish different management tasks. Make the script a certain "smart".First, condition test operationFile Test Common operations:-D:: Test

"Linux command, editor and Shell Programming" Third Edition study notes---003

Shell Preparation1. Identify the shell typeEchoEcho $BASHEcho $SHELLThe top three command results are:/bin/bash2, Terminal common operationA, delete a single character c+h or BACKSPACE keyB. Delete single word c+wC, delete a single row c+ud, repeat

Writing shell scripts using the IF statement

Tag: Shell script if statement Yang Shufan Shell $?In a simple shell script, each statement is executed sequentially in order to automate the batch process. However, a single sequential structure makes scripting less intelligent and difficult to

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

Shell File Audit

#!/bin/bash#####################Data: 2017/7/19#####################set-X#监控文件目录Init_path= "/home/test/share"#生成日志目录File_dir= "/tyk"File_type= (Reguar directory character block link socket pipe symbolic)file_magic= (text/plain inode/chardevice inode/

Sorting algorithm (3)--insert sorting--insertion Sort [3]--shell sort--Hill Sort

1. Basic IdeasHill sort is to group records by a certain increment of the subscript, sorting each group using the direct insertion sorting algorithm; As the increments gradually decrease, each group contains more and more keywords, when the

Description of function definition formats, function parameters, and Shell functions

Description of function definition formats, function parameters, and Shell functions You can use shell to define a function, and then use it in a shell script. The Function Definition Format in shell is as follows: [ function ] funname [()]{

Total Pages: 541 1 .... 139 140 141 142 143 .... 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.