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 |
In vi editor how do you execute unix commands?
Which command is used to delete all files in the current directory and all its sub-directories?
How can i know my Filesystem and its current usage in my prod UNIX system?
What is ctrl d?
what is the difference between Touch & cat command
Explain the terms ‘system calls’ and ‘library functions’ with respect to unix commands?
Give Command that will move a single file called "unix.txt"
what is the shell for dos,nt operating systems?
how will you convert a general file to a hidden file?
why metadb requires a seperate slice to create Solaris volume manager
distinguish between physical addresses and logical address?
what are filters?