Created
June 13, 2023 18:48
-
-
Save mickambar19/30b7cbba4d13904cf32a717c2d3f823c to your computer and use it in GitHub Desktop.
Command Line
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get lines of a file where a term is not found | |
# TERMS_FILE_NAME - The terms to search | |
# TARGET_FILE_NAME - File to exract the lines without a term matching | |
# | |
# `-v`: Inverse search, display lines that do not match the pattern. | |
# `-o`: Display only the matched patterns. | |
# `-w`: Match whole words only. | |
# `-n`: Display the line number of each match. | |
# `-f`: Read patterns from a file. | |
grep -o -E '\w+' TERMS_FILE_NAME | sort -u | grep -vnf - TARGET_FILE_NAME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment