August 17, 2024
grep command in linux
The grep command stands for "global regular expression print", is a powerful tool in linux operating systems used for searching and manipulating text patterns in files.
Functionality is as below
- Search Text Patterns: grep searches for lines in a file (or files) that match a specified text pattern.
- Output Matching Lines: grep outputs the lines that contain the matching text pattern.
Sample grep command is below
grep "pattern" filename
Sample of grep command is below
grep "error" /var/log/syslog