Command line and Shell: the command line refers to the interface that provides user input, which itself simply accepts input and then passes the command to the command interpreter, which is the shell.Note: The command line and file for Linux are
The set command functions primarily to display shell variables that already exist in the system, and to set new variable values for shell variables. The set command is not able to define a new shell variable. If you want to define a new variable,
Beta version: Easy cool cms2.5Contains a sentence: Http://localhost/ekucms2.5/?s=my/show/id/{~eval ($_post[x])}will generate an error log in the/temp/logs/directory of the website, naming rules for the year _ month _ DayError log contentsContains
First, the basic regular expression1. Regular expression: The regular expression is the string used to match the symbol condition in the file, and the Regex contains the matchinggrep, awk, sed, and other commands can support regular expressions.2.
One$n: Gets The nth argument of the current shell script, n=1..9, when n is 0, represents the file name of the script, if n is greater than 9, enclosed in curly braces like${10}.$*: Gets all parameters of the current shell and treats all
The file name of the shell itself$1~ $n Each parameter value added to the shell. $ $ is the 1th parameter, and the $ = is the 2nd parameter ...$$ the shell itself PID (ProcessID)$! PID of the Shell's last running background process$? End code of the
8.1:shell Introduction:The shell is a command interpreter that provides interaction between the user and the machine, supports specific syntax, supports logical judgments, loops, and each user can have his or her own shell:The CentOS default shell
1. Write a script to determine what the IP of the current online user is (there are many methods) in the 10.0.0.0/24 network.#!/bin/shfor N in ' seq 254 ' does ping-c1-w1 10.0.0. $n &>/dev/null If [$?-eq 0] then echo "10.0.0. $n is up
The following scripts are based on the above log format, and if your log format is different, you need to adjust the parameters behind awk. in the analysis log UserAgentCat Access_20130704.log | Awk-f "\" "' {print $ (NF-3)} ' | Sort | uniq-c | Sort-
1. First create a directoryVI hello.sh2. Write the first line of the shell#!/bin/bash (in order to declare a shell script, the first line must be written like this)3. You can add comments #the First program (this line of add # is not in effect)4.
Write a script to find the/data/log directory, the last created time is 3 days ago, the suffix is *.log file, packaged and sent to 192.168.1.2 Service under/data/log, and delete the original. log file, leaving only the packaged
2. Case statementOnly one conditional relationship is judgedGrammar:Case¢ variable name in"Value 1")Procedure 1;;"Value 2")Procedure 2;;*)Procedure 3;;Esac3. For loop1) Syntax: (Assigning a value to a variable executor, several values are executed
Basic Regular expression:A regular expression differs from a wildcard character:A regular expression is used to match a string in a file that matches a condition, and a regular contains a match. grep, awk, sed, and other commands can support regular
First, the basic knowledgeHere you'll learn about shell fundamentals and some of the knowledge points.Concept: The shell is the user interface of the system and provides an interface for users to interoperate with the kernel. It receives the command
Shell Common ScriptsAuthor:headsen Chen 2017-10-17 15:36:17Personal original, reproduced please indicate, otherwise, legal liability shall be investigated1,vim name.grep.sh2,cat tellme.sh3,cat idcheck.sh4,cat case.shNote: The file name is called in
To test the shell's looping nesting syntax1[Email protected] test]#VIXunhuanqiantao.SH 2#!/bin/Bash3 #程序功能描述:4 # test Loop nesting5 #作者: Lone boat Point6#版本:1.07#创建时间: .-Ten- A Geneva: $:
Linux often need to delete user actions, manual operation to perform Userdel operation can, if the deletion fails according to the error prompt action. But what if the script needs to invoke the Delete user action? Use the following example to
? Runtime.getruntime (). EXEC (cmdstring), if the parameters in cmdstring at this time (such as the CP file file name) contain special symbol spaces, then an error occurs, because the source code will follow some special characters ("\t\n\r\f",
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