Search for a word or pattern in a corpus
Type here
grep "pattern" corpus.txt
Search case-insensitively
Type here
grep -i "pattern" corpus.txt
Show line numbers with grep results
Type here
grep -n "pattern" corpus.txt
Count how many lines match a pattern
Type here
grep -c "pattern" corpus.txt
Search recursively inside a corpus directory
Type here
grep -r "pattern" corpora/
Extract lines that do not match a pattern
Type here
grep -v "pattern" corpus.txt
Search and show only the matching part
Type here
grep -o "pattern" corpus.txt
Search using a regular expression
Type here
grep -E "[0-9]{4}" corpus.txt