The execution name of this program$n the nth parameter value of this program, n=1..9$* all parameters of this program, this option can have more than 9 parameters.$# the number of parameters for this program$$ the PID of this program (the current
#!/bin/bash#from为压缩包批次所在目录#basetarpath to count the total length of time per batchFrom=$1Basetarpath=$2suffix= "Tgz"Todir= $basetarpathoutdir= $basetarpath/home/iflytek/outif [!-d? $from]; ThenExitFiif [!-D $basetarpath];thenMkdir-p
Experimental material:[[email protected] test]# ls//This directory contains all the files ending in. txt and requires all to be replaced by the. Doc End1.txt 2.txt 3.txt 4.txt 5.txtWriting scripts[Email protected] test]# vim/root/25.shScript content:
0x00 Preface
Scanner Scan to a website exists directory browsing, so there is this article ...Knowledge Point Popular Science:1. Directory browsing
Directory browsing in my personal view is a significant vulnerability, the
Conditional test Syntax:Syntax 1:test This is the method of conditional test expressions with the test command.Syntax 2:[]: This is the way to test an expression with a single parenthesis, as with the use of the test command, the recommendedSyntax 3
One step in writing a shell is to take a piece of text and process it.I. SED commandSed is a powerful streaming editor (stream editor for filtering and transforming text) that works perfectly with regular expressions, processing text line by row and
I. Special symbols in the shellNumber: wildcard character, can match 0 or any number of characters? Number: Tan,#号: An annotation character that is followed by a command or parameter that does not execute\ No.: Raise the meaning of the instruction
Pipe character| Represents the output of the previous instruction as input to the latter instruction#cat/etc/passwd|wc-lSuch as[Email protected] ~]# cat/etc/passwd|wc-l19Job Control#find./-type F View the current = Directory file#find./-type F |wc-l
Shell is an important application in the operating system, especially for Linux, the command-line mode of the operating system, the shell is of great significance.First, what is the shellThe shell is a command interpreter that provides interaction
1 scripting[Email protected] ~]# vim/root/yum.shScript content:#!/bin/bashrm-rf/etc/yum.repos.d/*echo "[110]name=110Baseurl=http://192.168.4.254/rhel7//yum Source to see the actual change, it is best to use the network Yum source, to ensure that
Tput commandtputYou can change terminal features, such as moving or changing the cursor, changing text properties, clearing specific areas of the terminal screen, and so on.Cursor PropertiesIn a shell script or command line, you can change the
Please look at the rules of several numbers below and use the shell script to output the following 10 digits10 31 53 77 105 141 ... [[email protected] ~]# cat 1 .sh# !/bin/basha =20 b =2 c = 10 echo $c for i in ' seq 0 20 "
First, the pipe characterPipe character: pipe symbol used to pass the result of the previous command to another commandExample:1. Count the number of rows in a fileCommand: CAT/ETC/PASSWD | Wc-l2. Count the number of files in the current
Native bash does not support simple math operationsWhen you are beginner, you can use $ (()) and expr to implementUse $ (()) to achieve:#!/bin/bash# file name: Test.shecho $ ((1+3)) #命令行第2个参数和第3个参数求和 # At this point the + number can be added without
What is a shell?The shell is the user interface of the system, which provides an interface (command parser) that the user interacts with the kernel, and the shell receives the user's input command and sends it to the kernel for execution, such
Shell TutorialsShell is a C language program, he is a user using Linux bridge, Shell is both a command language, but also a programming language.The Shell refers to an application that provides an interface through which users access the operating
The shell in Linux is an outer-layer protection tool for the Linux kernel and is responsible for completing the interaction between the user and the kernel.A command is a text stream in which a user issues a control request to the system kernel and
Summary
The attribute of an array is a set of identical data types, although the shell is a weak type, but we can also divide its array into 数据类型的数组 字符串类型的数组 two categoriesSeparating the shell array elements from each other 空格
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