Part One When he entered the current company at the end of 2014, the leader was preparing to develop a new software platform to replace the original one. The original platform uses C++Build develop
PAT Advanced 1014 Waiting in Line
Suppose a bank hasN windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:
No
Shell exercise -17
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
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)