Found that three symbols are useful when writing scripts. One is the pipe command "|", one is executing the command "&" in parallel, and the other is "&&"
The so-called pipe, acting as a function of the connection between the front and back two parts of the pipeline. Specifically, the result of executing the command before the pipe is used as the input after the pipeline. For example, when viewing DNS-related properties in Android, you can use the command getprop |grep DNS because getprop returns more results, but not all of our current concerns, using the grep command to filter the output of Getprop, Only contains the keyword DNS, which displays the properties of the Android system associated with DNS.
Execute the command "&" in parallel, which I recently learned from the Internet by searching for multithreading under Linux. Because the way to perform multiple operations on Linux at the same time is to open multiple terminal, you will find it inconvenient when the terminal is open more than once, and if there is any way to execute concurrently with multiple commands. & is the way to do this, as long as you add an ampersand between commands that need to be executed in parallel, multiple commands can be executed in parallel.
Serial execution Command "&&". If you want to see how much time a program is executing, you can view it using the command date&&./the program you need to execute &&date.
More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/OS/Linux/