Study-32:shell (b)

Three, Shell script Development Basic Specification System functions in 1,/etc/init.d/functions action using the method: Show XXXX, and the right side shows the green OK Word: action "xxxx"/bin/true Display XXXX, and the right side shows the red

12-shell Process Control

You can't write this in Sh/bash, and if the Else branch doesn't have a statement execution, don't write this else.If ElseifIf statement syntax format:If conditionThenCommand1Command2...CommandNFiWrite a line (for the terminal command prompt):If [$

Common command statistics for Linux systems and Shell special characters

Shell special characters: 1. Wildcard character 2. Piping1. Wildcard characters1.1 asterisk (*): matches any length1.2 Question mark (? ): Matches a length of characters1.3 square brackets ([...] ): matches the character specified in it1.4 Square

A simple example distinguishes between *,+ in a Linux shell regular expression.

1,linux The difference between the shell regular expression * and the + numberExample Memory:[email protected] data]# Touch test.txt[Email protected] data]# cat>>test.txt> Gooood> Goood> Good> God> GD> EOF* indicates repeating the preceding

Spark-shell Start spark Error

Objective  After installing CDH and Coudera Manager offline, all of your own apps are installed through Coudera Manager, including HDFs, hive, yarn, Spark, hbase, and so on, and the process is a twist, so don't complain and go straight to the

The Loop statement of Shell programming

Shell Programming Loop StatementsLearning Goals:Mastering the FOR Loop statement programmingMastering while looping statement programmingDirectory structure:For Loop statementL read different variable values to execute the same set of commands

Lab Four Shell programming (2)

1. Basic usage of shell variables and usage of common symbols( 1 ) Change the main prompt to the user's home directory namePS1 value restores default values after re-login.(2) the string DOS file c:>\ $student \* assigning values to variables x ,

The calculations inside the shell

---restore content starts---The calculation of the shell is actually already in contact with Linux. Every time in the use of the Internet is looking everywhere, so think to spend some time to study.First understand the following commonly used

How to use Shell functions

A shell function is a set of command sets or statements that make up an available block. Using functions can simplify scripting. The function requires that the function be defined and reused, and that it is used directly when calling the functions.

Linux Shell Script Programming

The shell script shell is a non-type interpreted language, which is defined when assigning a value to a variable.#!/bin/bash //环境说明- chmod o+x 文件名 //命令行运行 /bin/bash file name//Ibid. function $ variable name//reference variable $//The name

SSH Secure Shell garbled problem

1. Perform the command locale view, which appears as follows:[[Email protected] ~]#localelang=ZH_CN. Gb2312lc_ctype="zh_cn.gb2312"lc_numeric="zh_cn.gb2312"Lc_time="zh_cn.gb2312"lc_collate="zh_cn.gb2312"lc_monetary="zh_cn.gb2312"lc_messages="zh_cn.gb2

Experiment three, Shell programming

first, the contents of the experiment1. Practice command history, aliases, and special character usages in the shell (4th. 4.2, Section ~4.5)2. Shell command application exercise (see Experimental steps)3. Write a shell script that executes in 4

Pipe and Job control & Shell variables & environment variable profiles

Pipe symbol |Used to input the output of the previous instruction as the last instruction[email protected]]# Cat 1.txt | Wc-l2[email protected]]# cat 1.txt1.txt2.txt[[email protected]]# find./-type F | Wc-l37Job ControlWhen the process is running,

Shell Introduction, Command history, command completion and aliases, wildcard characters, input and output redirection

First, Shell introductionIi. History of the OrderHistorical command Store path/root/.bash_history, default can hold 1000 commands#history//View specific history commands[[email protected] ~]# echo $HISTSIZE//system built-in environment

Linuxday8--shell Script Programming Basics

VariableA variable is a named memory spaceAll variables in the shell are treated as character variables by default, and bash does not support floating-point variablesNaming rules for variables:You cannot make a reserved word in a program: for

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] Regular expressions and wildcard characters

Tag: Class begins with regular expression find parenthesis expression matches between awkRegular expressions and wildcard characters:1. The regular expression is used to match the qualifying string in the file , and the Regex contains the match .

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" Linux Shell Case detailed

In general, case is a judgment statement that is easier to understand than if.Case Statement Formatcase in 变量 值1) 内容 ;;值2) 内容 ;;esacNote: Each content needs to be added after;; , can be written across rows or peers. Instance: Executes

Shell Programming--function Chapter

One: function classification Local function (local variable)local variable name. modifications to variables in the local function are only valid during the current function run. Func1 () {local Name=test;echo "func1:name= $name"; local

Total Pages: 541 1 .... 172 173 174 175 176 .... 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.