Welcome to: Ruchunli's work notes, learning is a faith that allows time to test the strength of persistence.
Kafka The main shell scripts are[[Email protected] kafka0.8.2.1]$ ll Total 80-rwxr-xr-x 1 hadoop hadoop
Experiment (I.)Experimental purpose: Detect system once per minute "The root partition has less than 10G of free space to send warning messages to all terminals. "Experimental requirements: Write a script and automate the script.Experimental
Variable definition and use$var =value------don't add spaces around the equals sign$echo $var--$var to reference a variable$age = 20--Variable assignment$echo "She is $age"--reference variable in string, ${age}, can distinguish variable
First, what is the bean ShellBeanShell is a scripting language that conforms fully to the Java syntax specification and has its own syntax and methods. BeanShell is a loosely typed scripting language (this is similar to JS); BeanShell is written in
AWK: useful Data processing toolsAwk is also a great data-processing tool! SED is often used for the processing of an entire row, and awk prefers to divide a row into several "columns" ( or, in other words, a column) to handle. Thus, awk is quite
There are three main ways of running shell scripts in Linux:1. Direct command release: The shell.sh file must have readable and operational (RX) permissions, and then:Absolute path: Use/home/dmtsai/shell.sh to release commands;Relative path: If the
when writing loops in the Linux Shell , it is often necessary to use the variable's self-increment, now summarize the method of increment of integer variable.As far as I know, in bash, there are currently five ways to do this:1. i= ' expr $i + 1 ';2.
This paper aims to review the basic concepts of shell, programming model, variable type, script specification, language structure, script execution modeLinux hierarchy and Shell basic concepts
The Linux hierarchy is roughly divided into
Bash Script Programming:Variable: variable nameArray: Contiguous number of independent memory spaces, each memory space equivalent to a variable;Element: array name [index]Bash 4.0+Traditional arrays: Indexed as numbers, numbering starting from
The SED editor processes the input line by row, and then sends the results to the screen.-i option: Direct Action source file, source file will be modified. sed commands and options:
A\
Add one or more rows after the current line
Git branch view all local branches git status View current status git commit commit git branch-a view all branches git branch-r view all branches git commit-am "Init" commit and raise Release git remote add origin [Email protected]:ndshowgit push
Suppose there are variables var=http://www.hao.com/123.htm One, # Intercept, delete the left character, retain the right character. Echo ${var#*//}where Var is the variable name, # is the operator, *// deletes all characters from the
One, variable
Variables are the use of a simpler string instead of some special-meaning settings and data. Taking path, this path replaces the absolute path of all common commands, and with the variable path, we no longer need to enter the
What is a Shell?Outline "Preface " 1. Shell Introduction 2, Bash function introduction 2.1. Record command history 2.2. Command and file name completion 2.3. Aliases2.4. pipe character/redirect 2.5. Shortcut keys 3. Bash
Case: Flow control statements• Loop Statement For...done statement• Use (()) to extend the method of using arithmetic operations in the shell• Looping statement nesting• Jump out of the loop: Break and Continueshift parameter Left SHIFT commandHow
1. Simulating the Linux login shell#/bin/bashEcho-n "Login:"Read nameEcho-n "Password:"Read passwdif [$name = "CHT"-a $passwd = "abc"];thenecho "The host and password is right!"else echo "Input is error!"Fi2. Compare two number sizes#/bin/bashecho
First, Introduction1. Variable type:User-defined variables (local variables)Environment variables: Define each user's operating environment, has learned path,ps1; to be permanent, write to the corresponding locationPre-defined variablesPositional
Basic Regular expression (supports shell tools such as Grep,sed,awk)* 0 or more of the ordinary characters in front of the * character. Match any character^ matches the beginning of the line, or the following character is non$ Match Line End[] Match
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