Tag:for
-
Time:2021-4-18
1. About colon: when a line begins with, use for / F “tokens = 1 * delims =:”%% I in (‘findstr / n* test.txt ) do echo.%% J will:Filter out; 2. About semicolon: findstr* test.txt You can display the lines beginning with semicolons completely, but you can’t find them in the for statement. You must […]
-
Time:2021-4-17
In fact, for / L% I in (1,1,99) do @ echo% I there are many kinds of separators in the middle of bracketsThe form is as follows:for /l %i in (1,1,99) do @echo %i for /l %i in (1 1 99) do @echo %i for /l %i in (1;1;99) do @echo %i for /l %i […]
-
Time:2021-4-15
preface The combination of for range in go can easily traverse an array or slice, but in some cases, it is likely to be “pit” when using for range func main() { arr1 := []int{1, 2, 3} arr2 := make([]*int, len(arr1)) for i, v := range arr1 { arr2[i] = &v } for _, v […]
-
Time:2021-3-11
For statement from beginning to mastery A prefaceThe basic usage of two for sentencesThree for / F ﹣ delay with variableFour for / RFive for / DSix for / L 1、 Preface In batch processing, for is the most powerful command statement. Its appearance makes it possible to parse the text content, traverse the file […]
-
Time:2021-2-25
In the parameter f of the for command statement, the most difficult to understand is the options delims and tokens. This paper makes a simple comparison and summary.“For / F” is often used to parse text and read strings. In the division of labor, delims is responsible for cutting strings, while tokens is responsible for […]
-
Time:2021-2-24
(4) Tokens = x, y, M-N extract column Format: FOR /F “tokens=x,y,m-n” %%I IN (Command1) DO Command2 Usage: One sentence summary: extract columns. Generally speaking, extract the content of section m of each line together. Therefore, you can use this command to specify the extraction of text information. Tokens = sometimes means to extract all. […]
-
Time:2021-2-23
This is what we usually write when we need to extract the entire line of text. Copy codeThe code is as follows: for /f “delims=” %%a in (a.txt) do echo.%%a But the lines at the beginning of semicolon, for will also be ignored. Many times we need these lines. What should we do.It’s too troublesome […]
-
Time:2021-2-19
Use network monitoring software cacti to detect the traffic of a server and use SNMP service! I ran the command Yum – y install net SNMP as usual, and the result showed some error messages! Yum error: cannot retrieve repository metadata( repomd.xml )For repository is my original Yum source address, it’s time to update! The […]
-
Time:2020-12-20
The following statement implements the shutdown at a specified time on each day of the weekIf you want to change to a few days of the month, change the letters to numbers and separate them with commasThere are no error detection statements in the following code, so you must input the time in the specified […]
-
Time:2020-8-30
For command: Various usages of for I in: for i in “file1” “file2” “file3” for i in /boot/* for i in /etc/*.conf For I in $(SEQ – W 10) for i in {1…10} for i in $( ls ) for I in $(< file) For I in “[email protected]” – “takes all positional parameters, which can […]
-
Time:2020-8-19
Solution: do not use for to calculate the IOU between two groups and multiple rectangles Using numpy broadcast method, it is not recommended to use for statement in Python program. The for statement in Python takes a lot of time. If you use numpy broadcast, the idea will speed up a lot. code: def calc_iou(bbox1, […]
-
Time:2020-5-10
Due to security issues, apple blocked Adobe Flash player on Mac OS, resulting in some flash based content can not be displayed. In the game of Baidu experience mall lottery, there is a display problem. Finally, it is solved by installing flash player. Here is a brief introduction Software name: Adobe Flash player uninstaller for […]