sed
unix extract multiple lines
I have the following file: $cat somefile Line1 T:10 Hello Var1 = value1 Var2 = value2 Line2 T:2 Where VarX1 = ValueX1[详细]
2023-04-03 02:13 分类:问答Need to grab data inbetween tilde character
Can any one advise how to search on linux for some data between a tilde character. I ne开发者_StackOverflowed to get IP data however its been formed like the below.[详细]
2023-04-02 21:11 分类:问答sed: using part of the regular expression to parse the text
I have a line of text which looks like this: /src/my_module_my_branch/my_module Example: /src/goodcode_dev/goodcode[详细]
2023-04-02 21:01 分类:问答Specify a "-" in a sed pattern
I\'m trying to find a \'-\' character in a line, but this character is used for specifying a range. Can I get an example of a sed pattern that will contain the \'-\' character?[详细]
2023-04-02 19:36 分类:问答Cleanup php files from virus
I\'ll get mallwared site hosted on linux hosting. All php files now start from lines: <?php $md5 = \"ad05c6aaf5c532ec96ad32a608566374\";[详细]
2023-04-02 18:58 分类:问答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 分类:问答Extract numbers from filename
In BASH I thought to use sed, but can\'t figure how to extract pattern instead usual replace. For example:[详细]
2023-04-02 03:30 分类:问答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 分类:问答' in sed appearing in the wrong place
I am trying to set an IP in a file with sed.I am running this command sed -i \'s:$dbserver=\'\':$dbserver=\'10.0.0.2\':\' t.conf[详细]
2023-04-01 19:10 分类:问答How can I replace commas per newlines, but only if they are not between brackets?
I was wondering if you could help me with a replacement script im trying here... I\'ve got something like this:[详细]
2023-04-01 12:38 分类:问答