Awk
Display a few lines before selected word
The following command is correctly returning all the lines with warnings more than 0 from all files. grep -i warning * | grep -v \'Warnings: 0\' | more[详细]
2023-04-02 14:02 分类:问答bash: shortest way to get n-th column of output
Let\'s say that during your workday you repeatedly encounter the following form of columnized output from some command in bash (in my case from executing svn st in my Rails working directory):[详细]
2023-04-02 11:20 分类:问答Get next field/column width awk
I have a dataset of the following structure: 1234 4334 8677 3753 3453 4554 4564 4834 3244 3656 2644 0474[详细]
2023-04-02 09:00 分类:问答how to make awk add correctly when commas are used as digit group separators
I\'m trying to use awk to add up the numbers from an output file, but it seems awk doesn\'t understand the commas separating the thousands.[详细]
2023-04-01 20:38 分类:问答decimal pattern matching
I have a big file and the lines patte开发者_JAVA百科rn is given below: MDQ[11:15],IO,MDQ[10:14],,,,MDQ[12:16],TPR_AAWD[11:15][详细]
2023-04-01 19:37 分类:问答Using awk in BASH alias or function
I\'ve a command that works just fine at the command line, but not when I try to put it in an alias or function.[详细]
2023-04-01 13:17 分类:问答Using sed command for range of numbers
I have a file with city andnumbers. It\'s a csv file New York , 23456 chicago, 123,456,789,889981(2-6) phoenix123,76(0-3)[详细]
2023-04-01 09:16 分类:问答Get N line from unzip -l
I have a jar file, i need to execute the files in it in Linux. So I need to get the result of the unzip -l command line by line.[详细]
2023-04-01 02:19 分类:问答Split file in blocks with counter
The following awk one-liner allows me to split a file according to the character at position 22: awk -v pdb=\"${file}\" -F \"\" \'{close(c);c=$22}{print > pdb\"_\"c\".pdb\"}\' ${file}.1tmp[详细]
2023-03-31 20:04 分类:问答Split file according to patterns in two consecutive lines
I have files with the following format: ATOM3736CBTHR A 486-6.552 153.891-7.9221.00115.15C ATOM3737OG1 THR A 486-6.756 154.842-6.8661.001开发者_运维百科14.94O[详细]
2023-03-31 17:15 分类:问答