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
Recently in the Zabbix, the company has six new servers. When the Zabbix client is deployed, the baby is really angry. Grandpa's always so repetitive work is also not AH. But as a war five slag, what else can be mixed with rice? Think of last year
echo commandFunction: Display charactersSyntax: Echo [-nee][string]Description: Echo will send the input string to standard output. The output string is separated by a white space character, and a newline number is added at the endecho "$VAR _name":
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
If the expression contains special characters, the Shell will replace it. For example, using a variable in double quotes is a substitution, and an escape character is also a substitution.As an example:#!/bin/basha=10Echo-e "The universe is $a \
Shell Requirements: Write a scriptOne, add 10 users user1 to User10, password with the user name, if the user exists, but requires only the user does not exist in the case can be added, in the format of/useradd.shSolution ideas: 1. Use the FOR Loop
Shell Requirements: Write a scriptOne, add 10 users user1 to User10, password with the user name, if the user exists, but requires only the user does not exist in the case can be added, in the format of/useradd.shSolution ideas: 1. Use the FOR Loop
1. BackgroundThe Linux shell is a basic skill, because the weird syntax, combined with poor readability, is often replaced by scripts such as Python.Since it is the basic skills, it needs to be mastered. After all, the process of learning shell
March 31, 2015 18:27:34Scenario: A request may be linked to a number of different databases, such as Master and slave, in order to avoid repeating the connect database, you can save the linked database objectsThe next time it's called, just take it
ThemeIconOh my zshFirstUnity-tweak-toolTuning the Unity desktop environment, or the use of the Unity Tweak tool, is a very useful unity graphical management tool that modifies the number of workspaces, hot zones, and so on.Flatabulous
1. Remote transfer file: SCP xxx.zip [email protected]:/usr/local/src remote server User: Root ip:10.74.165.114: The subsequent pass file saves path 2. Unzip the zip file: Unzip xxx.zip-d AAA decompression Xxx.zip file is placed under the current
Create two scripts in the system bin directory, respectively, Pssh tsshPssh#!/usr/bin/expect-fSet IP [lindex$argv 0]set Port [lindex$argv 1]set Password [lindex$argv 2]set TimeoutTenspawn ssh [email protected]$ip-P$portExpect {"*yes/no"{Send "yes\r";
See the shell, write a script to set the parameters of the network card try it. It's inefficient, but it's a good use.===================#!/bin/bashLang=zh_cn. UTF-8Clear #Select the network cardecho "' Date '"Echo-e "\033[34m Select Network Card
The shell practice of Linux Learning
1. Describe the operation principle of shell program (can be attached with necessary graphic instructions);2, summarize all the knowledge points involved in shell programming (such as: variables, grammar,
First, IntroductionShell two command execution mode:1. Interactive: single Command execution2. Batch processing: scriptShell scripts are interpreted and do not need to be compiledtips: try to use a regular user accountSecond, the InterpreterRole:
1, in Makefile can only invoke shell script in target, other places can not be output. For example, the following code does not have any output:Var= "Hello" echo "$ (VAR)" All: ... ..The above code will not output at any time, not within target,
The operation of commands is analyzed and run from top to bottom, from left to right.
The order is released as mentioned in the fifth chapter: multiple blanks between commands, options, and parameters are ignored;
Blank lines are also
What I want to say here is a few shell parentheses, braces and parentheses, the use of commands, as follows:1.${var}2.$ (CMD)3. () and {}4.${var:-string},${var:+string},${var:=string},${var:?string}5.$ ((exp))6.$ (Var%pattern), $ (Var%%pattern), $
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.