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 the cmd to display the last exit status in UNIX?
What difference between cmp and diff commands?
how to check a file system type
When the shell is reading the command line what is the difference between text enclosed between double quotes ( ” ) and text enclosed between signal quotes ( ’ )?
what is kernel?
what is the command to print last 8 lines of any text file.
How to check the flavor of UNIX?
What is the functions of zambie process?
what is difference between unix and linux?
Name the various commands that are used for the user information in unix.
Explain ‘system calls’ with respect to unix commands?
What happens when we execute a unix command?