... | ... |
@@ -173,4 +173,15 @@ In a section |
173 | 173 |
sed -i '/^\[section\]/{$!{N;s/gain=.*/key=NewMULTILINE/;ty;P;P;:y}}' infile |
174 | 174 |
``` |
175 | 175 |
|
176 |
+# Match several times the same key=value |
|
177 |
+```bash |
|
178 |
+awk 'match($0, /ID>(TWA[^ ]+AS)<\/ID>/, asid){if(match($0, /Strategy="([^ ]+)">/, strategy)){print asid[1], strategy[1]}}' *.AS |
|
179 |
+``` |
|
180 |
+ |
|
181 |
+OR |
|
182 |
+ |
|
183 |
+```bash |
|
184 |
+grep -Pio 'Strategy="\K[^"]*' |
|
185 |
+``` |
|
186 |
+ |
|
176 | 187 |
|