In shell programming, "EOF" is often used in conjunction with ""It can be interpreted as a delimiter (delimiter). Since it is a delimiter, the form is naturally not fixed, where "EOF" can be customized, but the front and back "EOF" must appear in
1. Judging by file type (common)-B To determine if the file exists-D to determine if it exists and whether it is a directory (the directory is true)-E to determine if the file exists (exists as true)-F to determine if the file exists and whether it
Type command[[Email protected] ~]# Type [-TPA] name options and parameters:: Step with any option no parameter, type will show if name is an external command or bash built-in command -T: Whenthe-t parameter is added, the type The name is displayed
1. What is a shell?The shell represents two levels of meaning, one is the command interpreter, such as BASH, and the other is a shell script (a program written using the shell's function, which uses plain text files to write some shell syntax and
Shell Programming 2First, conditional judgment statement1, according to the file type to judge Eg:test-e/etc/passwd or [-e/etc/passwd] &&echo yes | | echo no note [] There must be spaces on both sides2, according to the file permissions to
One. grepgrep parameters:- n: Show Line Numbers- o: Show only matching content- Q: silent mode, no output, you have to use $? To determine the success of the execution, that is, there is no filtering to the desired content- L: If the match succeeds,
Path and command search orderBash Pit WelcomeBash Environment configuration fileTerminal settingswildcard characters and special symbolsThe TTY1~TTY6 command interface reads some key settings for the local computerUse Stty to view key contents[Email
[Email protected]_48_191_centos 456]# vim 2.sh#!/bin/bash #加入这行, which means that the interpreter is bash, no plus, I'm CentOS, the default is bashEchoecho $[Email protected]_48_191_centos 456]#/2.sh 1./2.sh1[Email Protected]_48_191_centos
Shell BasicsIntroduction to environment variable configuration file1, the role of the source command is to force the environment variable configuration file, the format is: the source environment variable configuration file or. environment variable
Standard input: 0 Standard output: 1 >,>> or 1>,1>>Error Output: 2 2>>,2>/dev/null 这个设备,是linux 中黑洞设备,什么信息只要输出给这个设备,都会给吃掉 Send standard output, error output to/dev/null$ ls test.sh test1.sh >/dev/null 2>&1,1 represents the standard output 2
Netstat
netstat-print network connections, routing tables, interface statistics, masquerade connections, and Mul Ticast Memberships
See Parameters:
-A (All) displays all options and does not show listen related by default-
The && (Command execution Control) syntax is formatted as follows: Command1 && command2 [&& Command3 ...] 1 use && connection between commands to implement logic and functions. 2 only the command on the left of && returns True (command return value $
Brief introductionAwk is a powerful text analysis tool, with the search for grep and the editing of SED, which is especially powerful when it comes to analyzing data and generating reports. To put it simply, awk reads the file line-by-row, using
Select Use AloneCat select01.sh #!/bin/bashecho "which car do you prefer?" Select CAR in Benz Audi volkswagendo Breakdoneecho "you chose $CAR"Run resultsSH select01.sh which car do you prefer?1) Benz2) Audi3? 1You chose BenzSelect and case are used
Conditional judging TypeAs long as the procedure, then the conditional judgment, that is, if then this discriminant must be learned, the other is Case...esacIf....thenThis is If...then is the most common conditional judgment, it is divided into
Variable: Stores the memory space of a single element:Array (multiple contiguous memory spaces): a contiguous memory space that stores multiple elements:Array Name:Index: Numbering starting from 0, is a numeric index;Note: Indexes can also support
Q1. ArraysWe know that variables are memory space, each variable can only store a single data, a one-time assignment operation, then encountered some need to continuously store and read the task, if you still rely on the variable for multiple
It is recommended to use PowerShell, just enter PowerShell in the CMD command window
Download 64-bit Python3.5 (be sure to 3.5!! Python3.5.2 can be downloaded and installed via Python 3.5 from python.org or Python 3.5 from Anaconda (note selecting
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.