Question requirementsAssuming that the root password of the current MySQL service is 123456, write a script to check whether the MySQL service is normal (for example, you can enter mysql normally t
Category: OS
Operating System (Operating System, referred to as OS) is a computer program that manages and controls computer hardware and software resources. It is the most basic system software that runs directly on the “bare metal”. Any other software must be supported by the operating system to run .
Regular expression
Regular expression 1. Regular expression single character
[[emailprotected] tmp]# grep ‘1’ passwd.bak #Find the line with ‘1’[[emailprotected] tmp]# grep'[AZ]’ passwd .bak #Find all capital l
Shell Training Day7 8.21
? [-f file] Determine whether it is a normal file and exist
? [-d file] Determine whether it is a directory and exist
? [-e file] Determine whether a file or directory exists
>? [-r file] Determin
Shell script – GREP and regular expressions
grep command
1, grep program: Linux Three Musketeers–grep, awk, sed
2, GrepL: text line filtering tool
Awk: report generator (formatting text output)
3, grep contains three
Shell write progress bar
test.sh
#!/bin/bash
i=0
bar=‘‘
label=(“|” “/” “-” “\\< span style="color: #800000;">“)
while [$i -le 100]
do
printf “[\e[43;46;lm%-100s \e[0m][%d%%][%c]\r” “$bar” “$i” “${label[i%4]}”
Shell Programming
1. Variable A=8
echo $A
echo “$0 $1 $2”
echo “$*”
echo “[email protected]”
echo “$#”
S=$[(2+3)*4]
= String Compare
-lt less thanless than
-le l
Regular expression – regular expression does not work in Go
Please forgive me for being an amateur of regular expressions, but I am really confused, why this is not a piece of code that does not work in Go
package main
import (
“fmt”
“regexp”
)
func
Regular expression detects if the IP address and port number are legal
Regular expressions to check whether the IP address and port number are legal, the code is as follows:
Regular expressions to detect IP address
public static bool CheckAddress(string s)
Regular expression – problems when capturing text between two letters
I use the following regular expression to get the text between /* and */:
(/\* )+(.+)(\*/) This method is good when this only needs to happen once, for example, when the entire string is like
Regular expression and wildcard introduction
Wildcards and regular expressions 1. Wild-card patterns are generally used to match file names, which are parsed by the shell, and are generally used for find (file search), ls (directory), cp (Cop