Tag:shell

  • Examples of the meaning and use of set and shopt command options in the Shell

    Time:2019-10-24

    preface This paper mainly introduces the meaning and use of set and shopt command options in Shell, and shares it for your reference and study. The following is not enough to say, let’s have a look at the detailed introduction. Set command option The set command is mainly used to display the shell variables that […]

  • How to read each line of a file using a Shell script loop

    Time:2019-10-23

    preface This article mainly introduces you to use Shell script loop to read each line of the file, share out for your reference, the following words do not say, let’s have a look at the detailed introduction. 1. Use a for loop for line in `cat filename` do echo $line done or for line in […]

  • SHELL(bash) scripting seven: source code analysis

    Time:2019-10-23

    This article on bash source code (version:4.2.46(1)-release) make a brief analysis. The data structure Bash is written in C language, and only a few data structures are used in its source code:An array of,The tree,Singly linked list,Two-way linked listandHash table. Almost all bash structures are implemented with these basic structures. The main structure in the […]

  • Common shell scripts

    Time:2019-10-23

    1. Disk monitoring sending script With the increase of data files, the disk may be full, so it is necessary to monitor the usage status of the disk in a folder. When the utilization rate reaches 70%, an alert will be issued and an email will be sent directly to the designated mailbox. The autosys […]

  • Linux system resources view (walker)

    Time:2019-10-23

    OS version lsb_release -a uname -a cat /proc/version System resource overview top memory free -h cat /proc/meminfo disk Disk capacity and partition status (unmounted partitions cannot be viewed) df -Th Disk capacity and partition status (you can view unmounted partitions) sudo fdisk -l sudo lsblk -f # /lib directory size du -sh /lib # /lib […]

  • Work wants to be good at its work

    Time:2019-10-21

    A good terminal will make people feel happy. No matter in visual effect or function convenience, you can use it safely and comfortably. The more you use it, the better it will be. You can’t stop. Well, there is no more nonsense. The first step of a good terminal is to install various software packages. […]

  • [go] go get auto agent

    Time:2019-10-21

    Original link: https://blog.thinkeridea.com/201903/go/go_get_proxy.html Recently, it was found that many people in the technology exchange group were asking about the failure of go get wall outsourcing, and they gave many solutions: From GitHub’s code base clone Set the goproxy environment variable to configure the proxy, for example: goproxy = https://goproxy.io Configure command-line proxy, httpsproxy environment variable […]

  • Shell (bash) script programming eight: Skills

    Time:2019-10-20

    So far, we have introduced the usage of common commands in Linux system, and briefly described the usage and workflow of bash program. When using bash to write script programs, mastering the usage of these tools can often achieve twice the result with half the effort. This article will try to discuss the skills of […]

  • Detailed explanation of the functions of various brackets in shell (), (()), [], [[]], {} (recommended)

    Time:2019-10-20

    I. parentheses () 1. Single bracket () ① command group. The commands in parentheses will be executed sequentially by opening a new subshell, so the variables in parentheses cannot be used by the rest of the script. Multiple commands in brackets are separated by semicolons. The last command can have no semicolon, and there is […]

  • NPM script command learning notes

    Time:2019-10-19

    What is NPM script? In the package.json file, use the script command defined by the scripts field { // … “scripts”: { “build”: “node build.js” } } How to execute NPM script? $ npm run build #Equivalent to execution $ node build.js I don’t know what NPM script? #View all NPM script commands for the […]

  • Detailed usage of printf in Linux shell

    Time:2019-10-19

    Detailed usage of printf in Linux shell One grammar Printf ‘output type output format’ output content Output type: %NS: output string. N is the number that refers to the output of several characters.%Ni: output integer. N refers to the output of several numbers.%M.n: output floating point number. M and N are numbers, which refer to […]

  • In web development, HTTP concept explanation!

    Time:2019-10-18

    What is HTTP? HTTP (Hypertext Transfer Protocol) is the basic protocol used to transfer files on the web. The most typical protocol is to transfer files between browsers and servers so that Internet users can browse them. As part of the URI, “http: / /” is referred to as the pattern, which is usually at […]