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

Answers were Sorted based on User's Feedback



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

Answer / bharath

grep command is used to search a file for keywords.
grep 'keyword' file

Is This Answer Correct ?    9 Yes 0 No

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

Answer / amit

grep command is used to search the any word, any sentence
from given or input file.
syntex of grep command is
grep "word or sentence" filename

Is This Answer Correct ?    7 Yes 0 No

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

Answer / guest

grep " string" filename

Is This Answer Correct ?    3 Yes 1 No

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

Answer / 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

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

Answer / shilpa

syntax= % grep pattern file-name-1 file-name-2
It is used to search files

Is This Answer Correct ?    0 Yes 1 No

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

Answer / bhaskar

syntax

grep "filename or string name"


It is used to find the values quickly

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Unix Commands Interview Questions

What is an Unix command to convert HEX value to ASCII value located in any flat file.

2 Answers  


what is Online(STM) and offline diagnostics in HP-UX?

2 Answers   HP,


What does sed command do in unix?

0 Answers  


What is the use of find command in unix?

0 Answers  


how will you convert a general file to a hidden file?

4 Answers  






what is the default permission for /etc/shadow file in UNIX

2 Answers   Wipro,


what does a process mean?

5 Answers   Infosys,


What is awk command used for?

0 Answers  


How i'll delete a particular line from the file? Please give answer as soon as possible. Thanks in advance.

12 Answers   IBM,


What do know about tee command?

0 Answers  


How we will execute previous command in vi editor?

8 Answers   Infosys,


How do you know about running processes of a particular user?

11 Answers  


Categories