A simple description of the shell variable

$*[Email protected]DifferenceThe shift parameter moves forward one bit, moving the position variable.$?$n$#$$!$$#!/bin/shPidpath=/tmp/p.pidIf [-F "$pidpath"]ThenKILL-USR2 ' Cat $pidpath '/dev/null 2>&1Rm-f $pidpathFiecho $$ > $pidpathSleep 300One of

Linux Gvim Shell functions

#函数: Must be defined before using#格式:#function_name () {# List of commands# [return value] #可以显示增加return语句, if not added, the last command runs the result as a return ##返回值只能是整数, generally used for function execution success or not, 0 for success,

Linux Shell Execution principle

Shell IntroductionThe shell is the user interface of the system and provides an interface for users to interoperate with the kernel. It receives the command entered by the user and feeds it into the kernel to execute.Running backgroundA basic Linux

Shell Combat Log desensitization

The actual combat target for the log desensitization, the log directory of all the files processed, all involved in the card number and password information, will be replaced by "*" number, to replace the contents are obtained from the corresponding

Regular expressions in the shell

1. Regular and wildcard characters The wildcard characters in Linux are used to match the file names, and their matches are exact matches. Only wildcard characters are supported, command has LS find CP and other commandsThe regular is used to match

Several methods of operation of Shell

a.expr normal addition multiplication operation Note: Expr can only perform integer operationsExpr 2 + 2Expr 2-2Expr 2 \* 2Expr 2/2Attention:1. Operators and calculated numbers have at least one space around them2. Using multiplication sign, you

Operation expression under the shell

Commonly used arithmetic operators, assuming that variable A is 10 and variable B is 20:Operator Description Example+ addition ' expr $a + $b ' result is 30.- subtraction ' expr $a-$b ' result is 10.* multiply ' expr $a \* $b ' result is 200.

Zookeeper Shell operation (reprint)

Reprinted from: http://www.cnblogs.com/sunddenly/p/4031881.html2.1.1 Zookeeper Command ToolAfter you start the Zookeeper service, enter the following command to connect to the Zookeeper service: Zkcli.sh-server localhost:2181 After

Print out 1,11,21,31,41 ... The shell script

Print out 1,11,21,31,41 ... The shell scriptmethod One:#!/bin/Bash for((i=1;i the; i=i+Ten)); Doecho $i #cat-n/etc/services | Sed-n"${i}p"#sed-N"${i}p"/etc/ServicesdoneOperation process, first cycle:1;1echo "1"Second cycle:1=1+10=11;11echo "11"Third

Server nginx with Shell statistics concurrency

# netstat-an| grep ': 80 ' | awk '/tcp/{a[$NF]++}end{for (i in a) print i,a[i]} '# echo "Current concurrency: ' netstat-ant | grep:80 | awk ' {print $} ' | Awk-f ":" ' {print $} ' | Sort | uniq-c | Sort-r-N | awk ' begin{total=0}{total+=$1}end{print

Job Management in the shell

ReferenceHttp://www.cnblogs.com/ggjucheng/archive/2012/10/21/2733028.htmlAdd a & after the command, such as Firefox &: Background execution.Jobs-l command lists How many commands are currently running in the backgroundCTRL + Z or send signal 17:

Shell simple Use (v) variable two

1. Read reading variables from the keyboard  2. Declare/typeset declaring variable typesA. The-i option of the DECLARE command specifies that the variable is an integer type (the default is a string)  B. The-X option of the DECLARE command specifies

Shell-1.shell notes

Shell annotations1. Single-line CommentLines that begin with "#" are comments, which are ignored by the interpreter.debian:/# Vim first.sh#!/bin/sh#This is my first shell (this line is a comment)echo "Hello World"2. Multi-line annotationsThere are

Shell Programming for Linux Basics (3)-setting parameters for scripts

Types of variables for bash本地变量(局部变量)环境变量位置变量:$1,$2,$3, ...特殊变量:$?,$#,$*,[email protected]The location variable that gives the script the ability to get external parameters,$1 for the first argument,$2 for the second argument, and so onCases:vartest.

Shell---------Debug Mode

If you have been exposed to the C language, you should know that the C statement is executed when the error editor will indicate the specific error in that line, of course, these errors are the machine can not be executed error! Unfortunately our

Linux shell-shift Command Usage (reprint)

Position parameters can be usedShiftcommand to move left. Like whatShift 3said the original $4 now become $ $ , the original $ $ now becomes $ $, etc., the original $, $, $ discarded, don't move. The shift command with no parameters is

Shell (10) sort

1. SortA. Sorting strings by default  B. With-r option: Reverse sort  C. Specify the option data field separator with-T, and the-K option specifies the data field to compare  D. Use the-N option to specify "pure digit sorting". As can be seen in the

Hill sort (Shell sort)

1. DefinitionThe Hill sort (Shell sort) is a sort of insertion. Because of D. L The shell was named after it was introduced in 1959.2. Basic IdeasFirst, take an integer less than n D1 as the first increment, dividing all the records of the file into

How to implement a basic thread pool with the shell

This article mainly describes how to use bash to implement a basic thread pool.1. Pre-knowledge {}& in Linux means the entire block of code is put into the background execution The wait Wait command indicates that all background

First day on cnblogs, broken shell Date ~ ~

Suddenly want to find a place to write a little article, and think of this old account, not because of the long-term silence was deleted is very touched ... All right, let's just commemorate this. First day.I suddenly wanna write something and

Total Pages: 541 1 .... 466 467 468 469 470 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.