I want to extract from a file all lines which don't content a specific pattern.
pattern="tmp/[...]/include/linux/*.h"
file contains:
17937;/home/[...]/tmp/[...]/include/linux/header.h;484;16;[Other text here]
37417;/home/[...]/tmp/[...]/src/file.cpp;1851;41;[Other text here]
17945;/home/[...]/tmp/[...]/include/linux/*/header.h;484;16;[Other text here]
The expected result is only the second line.
I've tried the bellow line and I get the entire content of the file:
grep -E -v $pattern file
It works only with the bellow line, but it is not enough:
grep -E -v .h file
How can I obtain the desired output?