Linux Bash Shell build base script
Build basic script
When creating a shell script, you must specify the shell to be used in the first line of the file. Its format is:
#!/bin/bash
environment variable
Example:
#!/bin/bash
#display user information from the system
echo "User info for userid: $USER"
echo UID: $UID
echo HOME: $HOME
User variable
The user variable can be any ...
Posted by Gafaddict on Sat, 05 Mar 2022 20:34:55 +0100
Firewall firewall policy details
Firewall firewall policy details
1, Firewall
firewalld Firewall is Centos7 The default firewall management tool of the system replaces the previous one iptables In the firewall layer, packet filtering also belongs to the network.
firewalld and iptables are tools used to manage firewalls (in user mode) to define various rules and functions o ...
Posted by bgbs on Fri, 04 Mar 2022 22:43:49 +0100
unity access to realize face recognition application - based on hongsoft face recognition algorithm 4.0
1, Preparatory work
1. Download SDK 4.0 of hongruan face recognition value-added version
1) Register and log in to the developer center
2) Download hongsoft face recognition SDK
2. Install Unity3D and Visual Studio 2019 development environment
1) Install Unity Hub
2) Install Unity 2020.3.1f1c1
2, Create DEMO project
1. Create Unity proj ...
Posted by Patty on Fri, 04 Mar 2022 20:52:04 +0100
elasticsearch uses ik Chinese word segmentation
1, Background
es comes with a lot of word splitters, such as standard, whitespace, language (such as english), but they are not very good for Chinese word segmentation. A third-party word splitter ik is installed here to realize word segmentation.
2, Install ik word splitter
1. Find the word breaker matching this es version from github
# Do ...
Posted by gvanaco on Fri, 04 Mar 2022 03:41:42 +0100
Local application and source configuration
catalogue
1, APT introduction
2, Supply mode of APT source
3, Local APT source
1. Use the DEB package of the CD as the APT source
2. The file source list is used as the system installation source
3. View profile
4. Update repository index
4, Network APT source
1. Backup profile
2. Write configuration file
1) Aliyuan (ubuntu 16.04)
2 ...
Posted by justravis on Fri, 04 Mar 2022 02:05:01 +0100
[Linux learning notes] 11 - process communication
Primary directory
Secondary directory
Tertiary directory
1. Pipeline
1. Anonymous pipeline
Anonymous pipes communicate with blood related processes
Anonymous pipeline communication steps: 1. A process opens the same file in read-write mode respectively, so there are two file descriptors, one pointing to the file in read mode and th ...
Posted by kyoru on Thu, 03 Mar 2022 12:42:50 +0100
high-risk!! Kubernetes new container escape vulnerability warning
Author: michelangela young, preacher KubeSphere, cloud native severely infected
On January 18, 2022, Linux maintainers and vendors in the legacy of Linux kernel (5.1-rc1 +) file system context function_ parse_ An error was found in the param function Heap Buffer Overflow Vulnerability with ID number CVE-2022-0185 , which is a high-risk vulne ...
Posted by gypmaster on Thu, 03 Mar 2022 05:16:15 +0100
bash string operation
Length of string
The syntax for obtaining the length of a string is as follows.
${#varname}
Here is an example.
$ myPath=/home/cam/book/long.file.name
$ echo ${#myPath}
29
Braces {} are required, otherwise Bash will interpret $# as the number of script parameters and variable names as text.
$ echo $#myvar
0myvar
In the above example, ...
Posted by jwright on Mon, 28 Feb 2022 02:55:52 +0100
Using bash script to establish local update source for Manjaro
As a school with insufficient funds, the infrastructure of our school is relatively backward. There are more than 100 machines in the computer room for students, but the total bandwidth of the Internet is still only 10Mb. Some students saw that I was using Manjaro and were interested in learning Manjaro, but found that the installation of softw ...
Posted by gclx on Sun, 27 Feb 2022 05:38:21 +0100
Using shell to realize the function similar to windows recycle bin under linux
When using linux, the rm -rf command is often executed, but this command is risky. For example, execute a shell script, which contains the following statements:
# script.sh
rm -rf $HOME/$SOME_PATH
At this time, if the environment variable HOME is caused by a setting_ If the path is empty, all contents in the HOME directory will be cleared di ...
Posted by shilpa_agarwal on Sun, 27 Feb 2022 05:00:05 +0100