Shell Scripts (1)a Shell script is a special application that receives the operation commands entered by the user and interprets them, passes the actions that need to be performed to the kernel execution, and outputs the execution results. You can
+++++++++++++++++++++++++ +++++shell Programming +++++++++++++++++++++++++++++++1. Basic Regular Expressionsregular expressions and wildcard characters:regular expressions are used to match conditional strings in a file, Regex contains matches, grep
To implement a shell interpreter of its own, the principle is relatively simple, first get the user's input, through the fork () function to get two processes (parent-child process), the child process through the EXECVP () function continues, at
Shell Essays I. learn about Shell Programming knowledge Reserve
I told you before, leave homework for everyone. Linux System command application;
Vi/vim Editor's proficiencyin the use of SSH client software settings;
basic services,
Shell Popular Understanding: Translate user-entered commands to the operating system.The Shell is an interactive command interpreter. The shell is independent of the operating system, which gives the user the flexibility to choose the right shell
Microsoft's recent open positions:JOB Posting Title:senior Software development EngineerLocation:china, BeijingDivision:operations System Group EngineeringGroup OverviewOSG is delivering flagship products in Microsoft. Second largest economy in the
Recently, I started to get started with some shell commands because of compiling some files. It seems amazing and the usage is quite large. So I made some notes and the command sequence may be messy, the function is not fully functional. 1. Cut
$0 the execution name of this program $ n the nth parameter value of this program, n = 1 .. 9 $ * all parameters of this program, this option parameter can exceed 9. $ # Number of parameters of the program $ PID of the Program (ID of the current
#! /Bin/bash# Initializing Environment VariablesSource. bash_profile# Inherent date format in log nameF_name = 'date + % Y % m % d'# Log path and nameLOG_FILE =/backup/DB/RMAN/log/RMAN $ f_name-0401.logEcho $ LOG_FILE# Counting the number of log
/* Configure /*----------------------------------------------------------------------------------------------- @ Blackeye poet Optional -----------------------------------------------------------------------------------------------*/ Role of
Start with 1The program must start with the following line (must begin with the first line of the file ):#! /Bin/shSymbol #! The parameter used to tell the system that the program is used to execute the file. In this example, we use/bin/sh to
Getting started with shell script
Note:
1. execute commands from top to bottom and from left to right;2. execute commands as mentioned in Chapter 5: multiple blank spaces between commands and options are ignored;3. blank lines will also be
Bash selection StructureSelect the program structure to determine the given conditions, determine certain conditions based on the judgment results, and control the program process based on the judgment results. (For details about how to use the
1 shell variable BasicsShell variables are very "weak" variables. By default, a variable stores a string, and shell does not care about the meaning of the string. Therefore, to perform mathematical operations, you must use commands such as let,
In Java and python, you can use the import method to call scripts or modules. For example:
>>> import math>>> math.sqrt(4)2.0
In Shell, how do I call other shell scripts, or variables and functions in other scripts?
Method 1:../Subscript.
READ command-N (do not wrap)-P (prompt statement)-N (number of characters)-T (wait time)-S (do not echo)
1. Basic readThe read command receives input from standard input (keyboard) or input from other file descriptors (as described later ). After
Tag: Shell
Before talking about [email protected] and $ *, you need to start with the positional parameter of shell script...We all know how variables are defined and replaced.However, we also need to know that some variables are set in shell, and
Tag: ShellIn shell command line, the average person may not care much about the differences between the two pairs of symbols () and,
Although both of them can group multiple commands, the technical details are quite different:
() Place the Command
Common shell Command records in Linux and linuxshell commands
Hardware
CPU Problems
Lscpu # view cpu statistics. cat/proc/cpuinfo # view CPU details, such as the Model and clock speed of each CPU.
Memory-related
Free-m # view the memory in
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