• How does Linux use the shell to see whether Linux is 32-bit or 64 bit


    Now most users use the windows system. They all know that the windows system is divided into 32-bit and 64 bit. In fact, the Linux system is also divided into 32-bit and 64 bit. Do you know how many bits your Linux system is? The following small series will teach you how to use the […]

  • Shell time (date) related commands


    date +%F date -d last-day +%Y-%m-%d date -d yesterday +%Y-%m-%d date -d next-day +%Y-%m-%d date -d tomorrow +%Y-%m-%d date -d ‘2 days ago’ +%Y-%m-%d date -d ‘2 weeks ago’ +%Y-%m-%d date -d ‘2 months ago’ +%Y-%m-%d date -d ‘2 years ago’ +%Y-%m-%d date -d ‘2 days’ +%Y-%m-%d date -d ‘2 weeks’ +%Y-%m-%d date -d ‘2 […]

  • Common operations built in Linux shell string (get length, find, replace)


    Developeppaer has also posted relevant articles before. Here, we recommend you to use some built-in functions. When writing shell programs, string related operations are often involved. There are many command statements, such as awk and sed, which can do various string operations. In fact, the shell has a series of built-in operation symbols, which can […]

  • Writing your shell is actually very simple


    quotation:I haven’t written a shell script before, maybe because I’m lazy, maybe I’m not forced to write a shell. However, some time ago, due to work needs, it is required to run scripts for several months again. These scripts are run regularly every day, and several scripts run together every day. You might say, it’s […]

  • Explanation of 10 basic problems of bash shell programming in Linux system


    Question 1: why is it called a shell? Before introducing what a shell is, let’s re-examine the relationship between users and computers. We know that the operation of a computer cannot leave the hardware, but users cannot directly drive the hardware. The hardware driver can only be controlled through a software called “operating system”. In […]

  • Discussion on Io, condition and loop processing in Linux shell programming


    >What’s the difference between you and me? When it comes to I / O redirection, let’s first know file descriptor (FD). In most cases, the operation of the program is to process the data. Where do you read the data? And where will it be sent? This is the function of file descriptor (FD). In […]

  • Share an entry-level controllable multithreaded shell script code


    When it comes to shell controllable multithreading, most of the online sharing are pipeline control schemes. Zhang Ge’s blog has also practiced and shared this scheme once:《Shell + curl website health check script, catch the lost site of China Blog Alliance》, interested friends can have a look. Share an entry-level controllable multithreaded shell script scheme […]

  • Linux shell + curl website health check script, catch the lost site of China Blog Alliance


    At the beginning of building the China Blog alliance, some bloggers reminded me that it is troublesome to maintain websites such as website Daquan, which requires a lot of energy to debug some websites that have died prematurely, and take SongGe’s blog Daquan as an example. Of course, I think so. Some time ago, I […]

  • Monitoring script sharing of Linux server hardware running status and fault email reminder


    Monitor hardware health The shell monitors the CPU, memory, and load average and records them in the log. When the load is under pressure, the shell sends an email to the administrator.Principle:1. Get the values of CPU, memory and load average2. Judge whether the value exceeds the user-defined range, for example (CPU > 90%, memory […]

  • Shell script — detailed explanation of SED usage


    catalogue 1. The use method of sed. There are two kinds of syntax for calling sed command: Common options for sed: Edit commands in sed: 2. Sed command example: Example 1: adding or inserting rows into a file Example 2: changing a specified line in a file Example 3: delete a line in a file […]

  • Shell script actual combat – while loop statement


    catalogue preface Use case of while 1. Cycle the number of outputs 1-10 2. Use while to read the file and print the file content 3. Output the effect of multiplying two numbers (as shown below) summary preface We discussed the use of the for loop above. It is very convenient for us to use […]

  • Quick start conditional statement and loop of shell script


    catalogue 1. Condition judgment 1.1 basic grammar 1.2. Common judgment conditions 1.3. Case examples 1.4. If judgment 1.5 case statement 2. Circulation 2.1 for loop Compare the differences between $* and [email protected] 3.2 whlie cycle I believe you have a certain understanding of shell script, and you must be looking forward to the conditional judgment […]