I would like to find line which starts from word: "ERRORS" and exctract number from that line.
Part of file:
...
[ERROR] No keywords and test cases defined in file
File path: libraries_instances.robot
TEST SUITES SUMMARY:
ERRORS: 148
WARNINGS: 89
CS VIOLATIONS: 201
My solution is:
grep ERRORS .validation.log | grep -o -E '[0-9]+'
is it possible to make it better and use only one grep?
Finally I would like to assign that value to variable in my bash script.