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 |
How we will execute previous command in vi editor?
What is grep short for?
how to make IGNITE-BACKUP in HP-UX?
How to find the files that are accessed before 10 minutes?
Explain command to display different lines that are found when compare two files?
what is the advaantage of each user having its own copy of the shell?
0 Answers BMC, CNS, DELL, Infosys,
Who wrote grep?
How do you create a file in UNIX
36 Answers Accenture, EMG, Nokia, QA, TD,
How can you see the command line history?
Name the various commands that are used for the user information in unix.
Name the general commands in using unix os for a beginner?
What is the Unix file system hierarchy?