#!/bin/bash# above is the shell script interpreter, which must be written at the beginning to represent the shell script. /bin/sh is more used under UNIX and features less than Bash. Use/bin/bash more, but/bin/sh is/bin/bash soft link in Linux.#
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
LinuxLinux CSHRC file functionsHow Linux processes/view process/kill processWhat permissions does Linux file 755 represent?Linux worker threadsLinux inter-Process communication methodPipeline,msgq ...Inter-process Communication _ Baidu
1. Data type:StringArray2. Naming conventions for variables:Can only start with a-Z or a-ZCannot have spaces in the middle, you can use _Punctuation cannot be usedCannot use the SHELL keyword3. Variable type:Environment variablesLocal variablesShell
1. Shell Tutorial1. Shell TutorialThe shell is a program written in C and a bridge for users to use Linux. Linux is both a command language and a programming language.
A shell is an application that provides an interface through which users access
1: User's shell History command saved in Home/username/.bash_history#!! execute the user's previous command#! PWexecutes the last command in the command history that begins with PW2: ' * ' to match 0 or more characters'? ' Match one character#ls-D
CD/: Entry root directory-----------------------[Email protected]:/etc$ CD/[Email protected]:/$ pwdCD ~: Entry user root directory----------------------[Email protected]:/$ CD ~[Email protected]:~$ pwd/home/tangymls : List all files.pwd : Show
and a supplier to check the data, the other side is the gmt+0 time zone, our report default Beijing time, can not be modified to GMT0,When you export data in Excel to Excel by hour, and then to a text file, the shell turns to GMT0 for statistics:Pre-
Now every time you analyze the site log, you need to determine whether Baidu Spider is a real spider, after nslookup need to determine if the result contains "Baidu" stringThe following is a list of some of the methods that the shell contains to
Now, based on the development of Linux, Internet products are basically based on Linux,android,mac, Linux everywhere, so, as a time-tested, not familiar with Linux is not good, record some of the common shell commands in the test.1, LS: Print out
For the new company, the company's leadership is very good. I feel more of the place is, their work efficiency is obviously higher than before. In the past will be very impatient for frequent changes in demand, now received after the demand will be
In the shell, if a piece of code needs to be called repeatedly, the code definition can be called a function, which is called directly in a later script. There are two ways to define a function:1. function functionname {}2, functionname () {}Example:
Shell variable Handling1. Variable deletion${var#key} Delete the shortest match from the beginning${var# #key} Delete the longest match from the beginning 2. Variable deletion${var%key} Delete shortest match from tail forward${var%%key} deletes the
Loop of shell scripts: repeating commands1.for CycleGrammarFor variable name in variable Value listDoCommandDoneFor based on the contents of the variable Value list, executes the command repeatedly until all the contents of the Variable Value column
Shell: A weakly typed programming language
What is a weak type and what is a strong type?
Strongly typed: Variables must be declared beforehand and even initialized before they are used;
Weak type: variable time
Create multiple catalogs at once[Email protected] tmp]# mkdir-p/user/{folder1,folder2,folder3} [[email protected] tmp]# Ls/user/folder1 Folde R2 Folder3Find the largest 10 directories in the root directory and sort them from large to small by using
Format: echo "/033[word background color; font color m string/033[control code"If you simply display the font color can be fixed control code bit 0m.Format: echo "/033[word background color; font Color m string/033[0m"Note:1, the word background
1. To Peanut Shell website:Peanut Shell official website: hsk.oray.com Download Peanut Shell Intranet version installation package oraynewphrapi.tgz2. Unzip under any path on the Raspberry PiDecompression: Tar zxvf oranynewphrapi.tgzInstall: Execute
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