Searching Text
grep is the tool you will reach for most often. Give it a word and it hands you the exact lines you wanted, then lets you count them.
Commands practised here
grep word filePrint every line containing a word.grep -c word fCount matching lines.grep -i word fMatch regardless of capital letters.grep -v word fShow the lines that do not match.
Nearby labs
- All labsBrowse the full list.
- Exam prepWhich exams these objectives map to.
- System Information
- Users and Groups