When it comes to sockets, people who have learned the basics of internet have heard that he is the abstraction of TCP/IP, he is the portal of the Internet world, it is everywhere.
Learn the socket programming, means to be able to more deep control
Eval
Eval performs a two-pass scan of the following commands, executes this command if the command is a normal command after the first scan, and guarantees the semantics of the indirect reference if the command contains an indirect reference to the
Loops are often used in shell programming, and the commonly used loops are for and while loops. While loops read files by default in rows, and for loops read file-splitting files with spaces, this article combines some examples of current web usage
The echo display in the shell script is displayed in color with the echo displayed in color with the parameter-EThe format is as follows:
Copy Code code as follows:
Echo-e "\033[character background color; text color m string \033[0m"
This article collects a bunch of shell scripting tricks, I said, I write a blog mainly to make some learning notes to facilitate their own review, so I will make such an article, there is nothing incomprehensible. About the origin of these
What is a shell?
Any invention has an interface for users to use. The interface used by UNIX for users is the shell (DOS command is familiar, but Unix is much more powerful).
The shell provides users with an environment in which commands and
Functions simplify code and enable scripting code reuse. One definition can be invoked more than once. Structured programming to enhance readability, you can define functionality as multiple functions, then save it in a file, and then use Source (.)
Print 99 The multiplication table is a must-write program in any language, especially after learning the loop.Print 99 multiplication Table First step
It is well known that the format of the 99 multiplication table is x * y = ZSo we need at
File Checksum MatchingIf you suspect that there may be a lot of files with the same Nevin , rather than using cmp or diff to compare all ranks , cause the time it takes to grow as the number of files grows to a sub-party . This is able to use
Transferred from: http://www.360doc.com/content/13/0523/16/7044580_287544243.shtml
on the shell:0 indicates standard input1 indicates standard output2 indicates standard error output> default to standard output redirect, same as 1>2>&1
1. Set the environment variable histsize so that it can save 10,000 command history.Vim/etc/profile changed histsize=1000 to histsize=100002. Why does setting PS1 (ps1= "[\[email protected]\h \w]\$") show a different result than we expected, and how
Http://kodango.com/useful-documents-about-shell$$ the shell itself PID (ProcessID)$! PID of the Shell's last running background process$? The return value of the last command that was run to check whether the previous command executed successfully.$*
Guide
When you're going to really manipulate your Linux system, there's nothing like a command-line interface that lets you do that. To be a Linux master, you must be able to understand the different types of shell commands and use them
Enterprise Utility Script 16Enterprise Case: Write Network Service standalone process mode rsync system startup scriptFor example:/etc/init.d/rsyncd{start|stop|restart}.Requirements:1. To use the System function library technique.2. To use a
The meaning of several variables in a common shell with a $ symbol:Difference:@">@ *
Same point: All parameters are referenced
Different points: only in double quotes. Suppose that three parameters were written when the script was run (stored
The script is:nohup/mnt/nand3/h2000g >/dev/null 2>&1 &For & 1 More accurate should be the file descriptor 1, and 1 is generally representative of Stdout_fileno, in fact, this operation is a dup2 (2) call. He standard output to All_result, and then
echo Display in shell script with color display, echo display with color, need to use parameters-The e format is as follows: The copy code code is as follows: Echo-E"\033[Word background color; text color m string \033[0m"For example, copy the code
Transferred from: http://yejinxin.github.io/parse-shell-options-with-getopts-command/Standard UNIX commands generally offer a number of options, with the user providing specific options and parameters, in the form of a command line, as
File Checksum MatchingIf you suspect that there may be many files with the same Nevin , instead of comparing all ranks comparisons with cmp or diff , The amount of time that is spent will increase as the number of files increases to the sub-party .
Tlcl-view the world echo in shell eyes
View the world in shell eyes
Echo-display a line of text
When you enter a command, bash expands the input characters before executing the command.
Expand path
Echo *
Shell expands * to the name of the file in
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.