Sed is an online editor that handles a single line of content at a time. When processing, the currently processed rows are stored in a temporary buffer, known as pattern spaces, followed by the SED command to handle the contents of the buffer, and
First, Introduction
Regular expressions are commonly used in many of the tools and commands in the shell, and understanding basic regular expressions and extending the meaning and usage of metacharacters in regular expressions is good for skilled
Use the shell to determine if a folder or file exists
Determine if a folder existsif [! -d "/etc/open" ];thenecho "文件夹/etc/open不存在"esleecho "文件夹/etc/open存在"fi
Determine if the file exists and delete it if it existsif [ ! -f
Http://www.cnblogs.com/suyang/archive/2008/05/18/1201990.htmlFrom the programmer's point of view, the shell itself is a program written in C language, from the user's point of view, the shell is the user and the Linux operating system communication
Refer to Linux Command, editor and shell programming (Tsinghua University Press)
When shell is started, it will run the Startup File to initialize itself. The specific file to run depends on whether the shell is a login shell or a non-Login Shell
From the operating system perspective, a job is a user task running in a computer system. In Unix/Linux systems, a job can be defined as one or more commands entered in the command line. Linux is a real multi-user and multi-task operating system,
1. Redirect related file descriptors
1) file descriptor
①0 standard input,/dev/stdin->/proc/self/FD/0
②1 standard output,/dev/stdout->/proc/self/FD/1
③2 standard error output,/dev/stderr->/proc/self/FD/2
2) redirection
①> Is 1>
②
③>
Shell programming Basics
Leal
Authorization license:
Create sharing agreement
GNU Free Documentation License
Edited by: firehare, dbzhang800
We can use any text editor, such as gedit, kedit, emacs, VI, to write shell scripts. It must start with
1. Enter the Ubuntu system and set up the android development environment.
1. Update the software source before installing the new system. In this way, when we use some software, we can directly use the tab key to complete the name of the software
I used shell to write some CGI examples. I would like to introduce it to you today.
CGI is an interface standard that does not distinguish programming languages. That is to say, CGI can be written in any language as long as it has standard input,
Structured commands: Allow scripts to skip or execute these commands cyclically based on the conditions of variable values or the results of other commands
1. Use the if_then statement
If command
Then
Commands
Fi
Run the command after if first.
Syntax
Wshshell. regwrite strname, anyvalue, [strtype]
ParametersStrnameIf strname ends with a backslash (\), this method sets the key instead of the value.The strname parameter must start with the root key of the following column.
Short longHkcu
Universal shell removal tool-quickunpack 2.1 Chinese Version
Quickunpack is a common shell removal tool that can remove the vast majority of compression shells and a small portion of encryption shells.Generally, the software author will
From: http://www.bllll.com/thread-43439-1-1.html
Shelling methods and techniques of common Shell
This article is a shell removal summary I made in my notebook when I was learning how to shell myself. It includes various shell shelling methods, the
Sed and awk
Background
When designing a script, you may need to modify the script, such as deleting or replacing some keywords. This method of dynamically modifying files during script execution is called Stream editing. A tool with stream editing
I. First, let's look at the following in linux:
Copy codeThe Code is as follows :#! /Bin/bash
Cd/ftp/
CURRENTDATE = 'date + % Y % m % d'
YESTERDAY = 'date-d yesterday + % Y % m % d'
THREEDAYAGO = 'date-d' 3 days ago '+ % Y % m % d'
# Echo $
Variable
Get local host name# Hostname
Obtain the System Version Number# Uname-r
Obtain CPU type
Obtain the cpu operation frequencyCat/proc/cpuinfo
Obtain memory usage# Free-m
Obtain hard disk usage# Df
Variable types and variable operations
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