First, expect explanation
Expect allows us to automatically log on to remote machines, and can implement automatic remote execution of commands. Of course, if you use key authentication without a password, you can also implement automatic
Shell commands are usually divided into two categories:Built-in commands (man Builtins)External commandThe difference between the two is analyzed below.Built-in commands:Internal commands are built into the shell. The internal command executes very
Based on some articles on the reference Web, a system-initialized shell script is summarized.#!/bin/bashcat /dev/nullyum-y install ntpdate &>/dev/ Nullntpdate 0.centos.pool.ntp.org &>/dev/nullhwclock-wformat###########################################
The relationship between the computer and the kernel, the shell: first, the management of the entire computer hardware is actually the operating system kernel (kernel), the kernel is required to protect, so our average user can only through the
ls: View file name and directory, usage: $ ls [option]1. $ lsEnter the LS command directly, listing all files and directories in the current directory, without displaying details such as type, size, date permissions, and so on.2. $ ls-lThe-l option
Purpose: Self-collation, self-review, self-reflection!Content: Dry Goods! Dry!! Dry!!!Attach: The shortcomings of the hope that you correct, can give like me rookie a little inspiration is the best. Just the inspiration ...Thank you: Thank the old
7. If you judge some special usageIf [-Z $a] This indicates what happens when the value of variable A is emptyIf Grep-q ' 123 ' 1.txt; Then what happens if the 1.txt contains a ' 123 ' rowif [!-e file]; Then what happens when the file doesn't
Hardware Chapter
CPU-related
Lscpu #查看的是cpu的统计信息. Cat/proc/cpuinfo #查看CPU信息详细信息, such as the model of each CPU, frequency, etc.
Memory-related
Free-m #概要查看内存情况 The unit here is
Knowledge Point Grooming: Click the link to enter1. Shell Introduction and variables, scripting related concepts2. Bash Programming: Condition testing3. Bash Programming: arithmetic operations4. Bash Programming: If statements5. Bash Programming:
String test:= =: Determine string equality! =: Judge strings are not equal-N: Tests whether the specified string is empty-S: Tests whether the specified string is not emptyLoop statement:for variable in list; DoLoop bodyDoneExample:For I in 1 2 3 4 5
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
-------------------------------------------------------------------------------------------------The types of variables in the shell are all strings by default, so:#!/bin/Bashaa=1bb=2cc= $aa +$bbEcho $cc 1+2Number of ways to calculate:Declare
Linux production server shell script sharing2012-6-6 86 Market Network LinuxAs a Linux/unix system administrator, I often meet people asking this question: what can the shell do? PHP is so powerful, why not use PHP to get the job done? In fact,
Linux bash Shell's declare declare or typeset built-in commands (which are exactly the same) can be used to constrain the properties of a variable. This is a way to use a less restrictive definition type in some programming languages. Command
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
function allows us to divide a complex function into several modules, which makes the program structure clearer and the code reuse more efficient. Like other programming languages, the Shell supports functions as well. The Shell function must be
Similar to other programming languages, the shell supports A for loop.The general format for A for loop is:For variable in list Docommand1command2...commandndoneA list is a sequence of values (numbers, strings, and so on), each separated by a space.
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