Shell pipe directive pipe

Pipe command pipe 1. The pipeline command only processes the standard output, and the standard error output will be omitted. 2. The pipeline command must be able to accept the data from the previous command as standard input to continue processing Select the commands cut and grep After analyzing a piece of data, take out what we want. Or take ...

Posted on Sun, 05 Dec 2021 16:29:22 -0500 by willeadie

linux reads environment variables

Environment variables often need to be configured during custom software installation. The following lists various configuration methods for environment variables. The environment of all the examples below is described as follows: System: Ubuntu 14.0 User name: uusama MySQL environment variable path needs to be configured: / home/uusama/mysql/ ...

Posted on Sun, 05 Dec 2021 03:06:41 -0500 by srboj

Variables in shell scripts

Definition of variables A variable is the address of an area of memory (a string representing the address of memory)Significance of variables: Commands cannot operate on constantly changing targets, and using a fixed string of characters to represent an unstable target can solve this problem 2. Definition of variables in shell scripts 1. ...

Posted on Thu, 02 Dec 2021 12:11:28 -0500 by koopmaster

Linux - Ubuntu automatically blacklists IP addresses that fail to log in multiple times through SSH through shell script

1: Introduction to login related documents Introduction to the three file logs of ubuntu: 1: / var/run/utmp: records the information of the currently logged in user. By default, who and w record the information of the currently logged in user, and uptime records the system startup time; 2: / var/log/wtmp: records the user information current ...

Posted on Tue, 23 Nov 2021 07:29:06 -0500 by jtravis

Text processing in Shell programming

You have to work very hard to look effortless! WeChat search official account [Coding road], together with From Zero To Hero! preface In daily work and study, we often have to deal with text files (such as log files), including but not limited to operations such as segmentation, search, replacement and deletion. Are there corresponding co ...

Posted on Mon, 22 Nov 2021 10:44:12 -0500 by maxpouliot

A new idea of command line parsing (described in Go language)

Author Ke ZhiSource: Ali technical official accountI. overviewCommand line parsing is a technology that almost every back-end programmer will use, but compared with business logic, these details are not important. If you only pursue to meet simple requirements, the processing of command line will be relatively simple, and any back-end programme ...

Posted on Wed, 10 Nov 2021 21:37:06 -0500 by phr0stbyte

1-3 environmental variables

        Following the above, let's introduce environment variables. In the first two sections, we introduced user-defined variables and location variables. In this section, we introduce environment variables. We only need to understand them. There are not many in our shell scripts. First, let's look at what are environment ...

Posted on Sat, 30 Oct 2021 01:00:18 -0400 by unstable_geek

Shell Programming Notes

1.shell programming overview 1.1 interpretation of shell terms Kernel The Linux kernel is mainly to deal with hardware shell command interpreterShell is a program written in C language. It is a bridge for users to use Linux. Shell is both a command language and a programming language.Shell refers to an application that provides an int ...

Posted on Thu, 21 Oct 2021 14:19:48 -0400 by gabrielkolbe

MySQL deletes the data of the first three months of the data table

testrecord database stores player behavior records, which need to be cleaned up every three months. Preparation before deleting data To view the size of the testrecord database: MySQL [(none)]> USE information_schema; Database changed MySQL [information_schema]> SELECT CONCAT(ROUND(SUM(DATA_LENGTH/1024/1024/1024),2),'GB') -> a ...

Posted on Thu, 07 Oct 2021 17:15:58 -0400 by shortysbest

shell basic learning

1. Basis The following program runs on a subsystem of WindowsLs/bin/sh-al obtains lrwxrwxrwx 1 root 4 Aug 26 20:44/bin/sh -> dash Run sudo ln-fs/bin/bash/bin/sh to replace the compiler with SHCreate directory mkdir shellCreate/Enter File vim t1.shPress i to enter edit mode, press Esc to exit edit mode, press: x to exitsh t1.sh run fileclear ...

Posted on Thu, 30 Sep 2021 12:45:33 -0400 by khan kaka