Linux Terminal Glossary
›
Text Processing
grep -o 'pattern' file.txt
Category:
Text Processing
grep -o 'pattern' file.txt
Copy command
Print only the matched portion of each line
Prints only the part of each line that matched the pattern, not the whole line.
Looking for more?
Search all 7,657 commands
— works offline, in English or Spanish, and fixes typos.