First, what is the shellThe shell is both an executable program and a programming language. as an executing program, it interactively interprets and executes user-entered commands , and is a bridge between the user and the Unix/linux; as a
1, write script/root/bin/systeminfo.sh, display the current host system information, including host name, IPV4 address, operating system version, kernel version, CPU model, memory size, hard disk size.#!/bin/bash# author:huiping# version:1.0.1# date:
Shell
The shell is a command-line interpreter whose function is to interpret the command that executes the user, and the user enters a command that the shell interprets to execute, which is called Interactive (Interactive).
The shell
Reproduced from--no flowering tree: http://blog.csdn.net/mycwq/article/details/16858805The finishing is very complete, so brought over,The Erlang shell is a tool that uses commands and Erlang interaction in command-line mode. The Erlang shell is
2016-08-10Content of the lesson:Shell Script Basics:VariableOperationBash Test (digital test, character test, file test, combination test)Read commandVariable action:1. Data storage format2, the operation of the participation3, the data range
Condition Test--test or [The command "test" or "[" can test whether a condition is true, if the test result is real, then the exit code of the command is 0, if the test result is false, then the exit code of the command is 1.650) this.width=650;
One, bash variables:Variable naming laws:1. The reserved words in the program cannot be made: for example if, for;2, only use numbers, letters and underscores, and cannot start with a number3. See the meaning of the name4, the Uniform naming rule:
Linux Nineth Day: (August 11) Linux shell script programmingA shell script is a text file that contains some commands or declarations and conforms to a certain formatFormat requirements Run shebang mechanism#!/bin/bashBash-n syntax errors in/path/to/
Shell Basics
Shell's Makeis the command that interprets the user, the user enters a command, and the shell interprets the execution of a rule, which is called Interactive (Interactive),The shell also has a way of executing a command called
Eleven. AWK Programming:1. Variables:The awk variable is defined when it is assigned.The type of the variable can be a number, a string.The value of the uninitialized variable is 0 or the blank string "",List of assignment symbols for variables=+=-=*
Turn from:http://blog.csdn.net/dawnstar_hoo/article/details/4043887Table of Contents1. Introduction to SED2. Addressing3. SED command4. Options5. Meta Character Set6. Example7. Scripts1. Introduction to SEDSed is an online editor that processes a
How to let awk use Shell variables under LinuxWhen we write shell scripts, we typically include other small programs or commands in the script, such as awk operations. For awk , we need to find some way to pass some values from the shell to the
Awk is a powerful text analysis tool, with the search for grep and the editing of SED, which is especially powerful when it comes to analyzing data and generating reports. To put it simply, awk reads the file line-by-row, using spaces as the default
First preprocess the number of layers and rows, then three answers, pay attention to the details#include #defineINF 0x3f3f3f3fConst intmaxn=2000100; typedef __int64 LL;using namespacestd;inti; LL N,s,ans1,ans2,ans3; LL SUM[MAXN+Ten]; LL
The file descriptor is an integer associated with the input and output of the file, which is used to track open files, and the file descriptor 0,1,2 is reserved by the system.0--stdin (standard input)1--stdout (standard output)2--stderr (standard
For syntax formatfor Var in list;doCommandsDoneWhere list can contain:1) write directly for in a b c D; do Echo $alpha Done2) variableslist="a b c d" for in $list; do Echo $alpha DoneThe variable is replaced when the shell executes, and
On the surface it means: The current bash PID, but the various shell environments to understand thoroughly.Official explanation:BashpidExpands to the process ID of the current bash process. This differs from$$ under certain circumstances, such as
About SEDSed is an online editor that processes a single line of content at a time.When processing, the currently processed rows are stored in a temporary buffer called pattern space, followed by the SED command to process the contents of the buffer,
Reference: http://blog.csdn.net/wanglang3081/article/details/49423105 (1) Makefile is essentially a shell script, that is, each command is a shell process, and the shell process exits when it finishes running. (2) Shell code line, if there is =,
1. What is a regular expressionIt is mainly used for string pattern segmentation, matching, finding and replacing operations.2. Regular expressions and wildcard charactersA regular expression is used to match a qualifying string in a file, and the
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.