What is the syntax of grep command and what is its use?
Answers were Sorted based on User's Feedback
Answer / bharath
grep command is used to search a file for keywords.
grep 'keyword' file
| Is This Answer Correct ? | 9 Yes | 0 No |
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 |
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 |
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 FIND, GREP and SED ? Could you please give me the difference between all the three? Where we use this commnands?
what is virtual machine?
What is in grep command?
distinguish between physical addresses and logical address?
23 Answers College School Exams Tests, CTS, Infosys, SAX, TATA, TCS,
what is the cmd to remove the comment lines from a file and to display the original text without comments? thanks in advance......
what is the use of "test" command in unix?
distinguish between multi-tasking,multi-user,multi- processing and time sharing?
7 Answers Alcatel, Cisco, Infosys, University Exams,
How to add content of one file into another file at the beginning
how to check a file system type
What are the unix commands?
distinguish between user mode and kernel mode?
Why is it called a shebang?