( carlcolt | 2014. 05. 05., h – 18:31 )

A helyes megoldás:

# Search for noncomment (not # line) patterns listed in patterns.txt and search for them
# one by one in text.txt and list matching lines alphabetically (and uniquely)
grep -f <(grep -v ^# patterns.txt) text.txt |sort -u