System

Common Linux Shell Skills (12)

tricosa-. Bash shell programming: 1 Read user variables: The read command is a built-in command used to read input from a terminal or file. The read command reads the entire line of input, and the newline character at the end of each line is not read in. After the read command, if the variable name is not specified, the read data will be automatically assigned to the specific variable REPLY. The following list shows the common way of the read command:
read the whole passage
System

Common Linux Shell Skills (9)

XIX Shell commands related to system running process: 1 Process monitoring command (ps): To monitor and control a process, you must first understand the current process, that is, you need to view the current process. The ps command is the most basic and powerful process viewing command. This command can be used to determine which processes are running and the running status, whether the process is ended, whether the process is dead, which processes occupy too much resources, and so on. In short, most of the information can be obtained by executing this command. There are many command line options and parameters for the ps command. However, there are only two types of options and parameters that we most commonly use. Here we first give the meanings of the options and parameters related to them:
read the whole passage
System

Common Linux Shell Skills (8)

XVIII Shell commands related to system health: 1 Linux real-time monitoring command (watch): watch is a very practical command, which can help you monitor the running results of a command in real time, saving manual running again and again. The two most commonly used options of this command are - d and - n, where - n indicates how many seconds to execute the "command", and - d indicates where the highlight changes. Here are some commonly used real-time monitoring commands in watch:
read the whole passage
System

Common Linux Shell Skills (5)

XI Awk programming: 1 Variable: in awk, the variable can be used without definition. The variable has been defined when it is assigned. Variable types can be numbers or strings. The value of uninitialized variable is 0 or the blank string "" depending on the context in which the variable is applied. The following is the list of negative signs assigned to variables:
read the whole passage
System

Common Linux Shell Skills (4)

IX The utility function of awk: like sed, awk scans the file line by line. From the first line to the last line, it searches for the lines matching the specific template, and runs the "select" action on these lines. If a template does not specify an action, these matching lines will be displayed on the screen. If an action does not have a template, all lines specified by the action will be processed. (more…)
read the whole passage
System

Common Linux Shell Skills (3)

8、 Stream editor sed: sed processes one line of files at a time and sends the output to the screen. Sed stores the currently processed lines in a temporary buffer, called the pattern space. Once sed finishes processing the lines in the pattern space, the lines in the pattern space are sent to the screen. (more…)
read the whole passage