Under the Linux system, Shell scripts can help us in a variety of situations, such as displaying information, even automating specific system administration tasks, creating simple command-line tools, and so on.In this guide, we'll show Linux novices
grep-a digital search to show the next line of information650) this.width=650; "height=" 290 "src=" http://b176.photo.store.qq.com/psb?/81c1194a-ff39-4e50-b1b1-40057b06260f/
Summary of Common shell commandsThis article summarizes some of the common shell commands, hoping that Linux small white like me in the familiar with these commands, can basically cope with the small white phase encountered problems1.cdAfter the CD
Self-taught shell, and was taught by the teacher, English class do not study English four how to live, haha, that there is no data on my attractiveness, ah, for love and dream!!!Recall the file format: filename with an. sh extensionFile content at
Bash is the default scripting language in a Linux system, and since it is a programming language, debugging of scripts is essential. Here's a simple debugging approach to bash:1 using Bash's parameter-X, such asBash-x a.sh+ for A in ' bafa{1..4} '+
Design a shell program, add a new group to Class1, and then add 30 users belonging to this group, the user name in the form of Stdxx, where xx from 01 to 30!#/bin/bashgroupadd class1 for i in {1..30}do if [ $I
Shell instance (i)
Example one:
equals-eq (equal)Unequal-ne (not equal)Greater than-GT (greater than)Smaller than-lt (less than)Greater than or equal to-ge (greater than or equal)Less than or equal to-le (lesser than or equal)Examples
Limit the number of rows when you sweep a table' table_name ' 5 }When the table is scanned, only five data is specified==============================================Delete TableThe deletion of the table requires the implementation of two steps,
Type of shell
View the shell program used by the user, the Seventh field in the/etc/passwd file (as if it were the last one, mainly the bash shell)
There is also a default shell of/bin/sh, which acts as the default system shell for
What is a regular A regular is a way to describe a character or string by combining symbols with special meanings, called regular expressions. Or, the regular is the rule used to describe a class of things.In Linux, wildcard characters are
Task one goal: Automatic deployment, initial configuration, and start Nginx reverse proxy serviceSplit the task-the Automatic Deployment section is the first to download the installation NginxFirst, create a very NB-domineering catalogue and a
Use tail--help to view commands for memotail [-f] [-c number | -N Number | -M number | -B number | -K number] [File]Usage:tail [OPTION] ... [FILE] ...Print the last ten lines of each FILE to standard output.With more than one file, precede each
Loop of shell scripts: repeating commands1.for CycleGrammar:For variable name in variable Value listDoCommandDoneFor based on the contents of the variable Value list, executes the command repeatedly until all the contents of the Variable Value
Shell Basics (ii) Cut usageSyntax: cut-d ' delimited character ' [-CF] n-D after specifying delimiters , single quotation marks, must be a single character-f Specifies the paragraph, which can be separated by commas with multiple numbers-C is
String interception from the original address: http://www.jb51.net/article/56563.htmOne: string interceptionThere are VAR variables:var=http://www.aaa.com/123.htm1. # Intercept, delete the left character, leave the right character.echo ${var#*//}Www.
Shell Basics (iii) Sort usageSyntax:sort [-t delimiter] [-KN1,N2] [-nru]Here n1-T followed by delimiters, acting like cut-d,-N uses a purely numeric sort, only for numbers, and if it's a letter, it's handled by 0 .-R Reverse Sort-U to repeat-kn1,n2
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.