Junior — Middle
Kas saaksite selgitada grep käsu tööpõhimõtet ja peamisi funktsioone Linuxis?
sobes.tech AI
Vastus AI-lt
The grep command in Linux is used to search for lines in files or the output of other commands that match a given pattern (usually a regular expression). Main functions:
- Search for text by pattern in files
- Filter the output of other commands
- Support for regular expressions
- Options to ignore case, display line numbers, count matches
Example of usage:
grep -i "error" /var/log/syslog
This example searches for all lines containing "error" regardless of case in the system log.