A purely grep question.
A file contains commented out strings. For example:
abc
abc1
# def3
ghi5
qwe
I want to get all strings with a number in it, but not if this string prepended with "#". So in this example we should see
abc1
ghi5
The double grep solves the problem:
grep -vE "^#" file.txt | grep -E "[0-9]"
Now the question: Is there a way to do that in one run of grep?