Answer Posted / kaustubh
grep command is a utility which helps in searching pattern
from the given file.
example
grep "pattern" /home/username/somefile.txt
it ll search all lines in the file somefile.txt and will
print the line which contains pattern.
there are many options as
-v = invert
-i = ignorecase
-c = count
-l = filename
-r = recursive
| Is This Answer Correct ? | 7 Yes | 6 No |
Post New Answer View All Answers
c program to implement unix/linux command to block the signal ctrl-c and ctrl-\ signal during the execution ls -l|wc -l
What does $$ mean in shell script?
Is cmd a shell?
What is the lifespan of a variable inside a shell script?
How to print all array elements and their respective indexes?
How can any user find out all information about a specific user like his default shell, real-life name, default directory, when and how long he has been using the system?
Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.
How can I send a mail with a compressed file as an attachment?
Explain about stdin, stdout and stderr?
I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?
What is the difference between break and continue commands?
What is difference between bash and shell?
What is shell variable?
How to check if the previous command was run successfully?
What is bash shell command?