What is the syntax of grep command and what is its use?

Answer Posted / ankita

grep is used to find the patterns inside files.

grep -options "pattern" file_name

grep -i "hello" test_file

this is search for "hello"(case doesn't matter as we have used -i) in test_file

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the nmap command?

579


What is unix command?

579


How do I use grep to search for a file?

578


Are you in or at the office?

609


How do I search for text in vi?

582






What is the use of cut command in unix?

688


What is unix command line?

602


What does this command do,"$more readme.txt“?

685


How can you see the command line history?

580


What is the command to view process running?

570


What is sed awk grep?

600


What is the use of egrep command in unix?

622


What is updatedb?

580


What are filter commands in unix?

549


What are bash commands?

588